Tableau:显示同一测量的不同数字格式 [英] Tableau: Display Different Number Formats for the Same Measure

查看:1071
本文介绍了Tableau:显示同一测量的不同数字格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在仪表板中有一个名为结果的字段,显示多个度量值的医生办公室的绩效结果。大多数结果值是费率,应显示为百分比。不幸的是,有两个结果 s,利用率管理:度量3和利用率管理:度量5,它们不是比率,而是实际的数值。



有没有办法在我的表中显示结果字段,以便所有的度量不是利用率管理:度量3或利用率管理:度量5以百分比形式显示,而上述两个度量显示为数字值

不要挂在同一领域的速率和数值相结合的适当性,因为我试图与我的客户进行对话...他们坚持这种显示能力,不会在没有它的情况下通过UAT。谢谢。



附上同样的问题提供和打包的工作簿供参考这里
解决方案

一种方法是定义一个字符串值计算的字段,使数字格式计算逻辑的一部分。这个解决方案不适用于度量名称和度量值,因为您不能在度量值框架上放置字符串值度量。但是,您仍然可以通过一些努力来构建客户需要的视图。首先,根据您的字段创建一个静态集[Measure](混淆字段名称的选择,顺便说一句,你有一个名为Measure的维度)。调用它 [百分比度量值] ,然后勾选要显示的百分比值。

然后,对于每个你想要的数字度量字段如果用attr([Percentage Measures]),则

 (round(sum([outcome]),3))
end(round(sum([outcome])* 100,2))+%
else else $ b $ str b


$ b $ p
$ b

这种方法假设您将在视图中使用您的计算,其中您的维度名为[Measure] - 过滤器)架子。根据需要调整round()函数参数


I have a field in my dashboard called outcome that displays the performance results for a doctor's office for multiple measures. A majority of the outcome values are rates and should be displayed as percentages. Unfortunately, there are two outcomes, "Utilization Management: Measure 3" and "Utilization Management: Measure 5" that are NOT rates, but actually number values.

Is there a way to display the outcome field in my table so that all 'Measures' that are NOT "Utilization Management: Measure 3" or "Utilization Management: Measure 5" get displayed as percentages, while the two aforementioned measures are displayed as number values?

Please do not get hung up on the appropriateness of combining rate and number values in the same field, as I've tried to have that conversation with my customer...they are insistent on this display ability and will not let it through UAT without it. Thanks.

Same question posed and packaged workbook attached for reference here.

解决方案

One approach is to define a string valued calculated field that makes the number format part of the calculation logic. This solution does not play well with Measure Names and Measure Values, since you can't put string valued measures on the Measure Values shelf. But you can still build the view your customer wants, with a little effort.

First create a static set based on your field [Measure] (confusing choice of field name, by the way. You have a dimension named Measure.). Call it [Percentage Measures] and check off the ones you want displayed as percentages.

Then for each of your numeric measure fields that you want treated this way, make a corresponding calculated field that looks something like:

if attr([Percentage Measures]) then
   str(round(sum([outcome]) * 100, 2)) + "%"
else
   str(round(sum([outcome]),3))
end

This approach assumes you will use your calculation on views where your dimension named [Measure] is on some (non-filter) shelf. Adjust the round() function arguments as desired

这篇关于Tableau:显示同一测量的不同数字格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆