问题描述
链接到),它显示正确的等级,即<$ c $
$ b $> ://i.stack.imgur.com/FeuU2.pngrel =nofollow noreferrer>
但是只要选择任何 A
Tot_Avg计算方式如下: 以下是接收A的条件: 如何排除故障? 我觉得你的困惑是在 因此,如果只有一个位置,接收一个A将永远是真的。 (检查数学运算: 这里有一个不同的方式来获得你的东西。做一个计算的字段(我将称之为位置过滤器): 然后清理您的位置过滤器,并将其替换为该字段。我们在这里做了一些鬼鬼祟祟的事情 - 我们正在制作和以前一样的过滤器,但是我们把它伪装成一个表格计算(通过使用 Link to workbook on public tableau I created calculated value to determine grade for business, and this is colormap (in tab And when I hover over datapoints on map (tab But as soon as I select any location from a drop-down, all grades are Tot_Avg is calculated like this: Avg_Rating like this: And here are the conditions for receiving an A: How to troubleshoot? I think your confusion is in what that As a result, your condition for receiving an A will always be true if there's only one location. (Check the math: Here's a different way to get what you're after. Make a calculated field (I'll call it Location Filter): Then trash your Location filter and replace it with that field. We're doing something sneaky here - we're making the exact same filter as we had before, but we're disguising it as a table calculation (by using 这篇关于在切换快速过滤器时,Tableau工具提示不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
$ $ p $ {EXCLUDE Avg_Rating像这样:
AVG([评分])
IF [Avg_Rating]> ATTR([Tot_Avg]) - (.10 * ATTR([Tot_Avg]))
那么A
EXCLUDE
正在做。它不会忽略过滤器。只是在汇总 AVG([Rating])
时,不要按位置进行分组。当您过滤除一个位置以外的所有位置时,AVG([评级])和 {EXCLUDE [位置(Loc)]:AVG([评级]) }
变成等价的,因为无论是哪种计算方式,你都是对你的过滤分区中的所有点求平均值。
X> X - .1X
→ X> .9X
)
$ $ $ $ $ $ $ $ $ $ $ LOOKUP(ATTR([Location(Loc)]), 0)
LOOKUP()
)。 Tableau在创建过滤分区之前不会执行表计算,所以我们已经欺骗了它,让我们在使用每个位置的同时仍然只是检查一个。Grade per Location
)Map
), it displays correct Grade, i.e. D
for Shish Boom Bah Car Wash
A
{ EXCLUDE [Location (Loc)] : AVG([Rating]) }
AVG([Rating])
IF [Avg_Rating] > ATTR([Tot_Avg]) - (.10 * ATTR([Tot_Avg]))
THEN "A"
EXCLUDE
is doing. It is NOT ignoring filters. It's just saying not to group by Location when aggregating AVG([Rating])
. When you filter out all but one location, AVG([Rating])
and { EXCLUDE [Location (Loc)] : AVG([Rating]) }
become equivalent, because with either calculation, you're averaging for all points in your filtered partition.X > X - .1X
→ X > .9X
)LOOKUP(ATTR([Location (Loc)]),0)
LOOKUP()
). Tableau doesn't execute table calculations until after it's created the filtered partition, so we've tricked it into letting us use every location while still just examining one.