June 21, 2016
Tableau Tip Tuesday: Using LOD Calcs for Year over Year Comparisons
alert
,
ascii
,
bullet graph
,
comparison
,
level of detail
,
LOD calc
,
Tableau Tip Tuesday
,
year over year
4 comments
For this week’s Tableau Tip Tuesday I show you how to use Level of Detail expressions to get the latest year and prior year and then compare then to create visual alerts.
Subscribe to:
Post Comments
(
Atom
)
Hi Andy! thanks so much for this, it's great and just what I need. I'm trying to replicate this but when I get to the latest sales (in my case Revenue) "IF YEAR([Date])=[Latest Year ] Then [Revenue Ex Hedge] ELSE 0 END"
ReplyDeleteIt shows an error message of mixing aggregated and not aggregated arguments in the Year=Latest year and in the IF function.
Any idea what am I doing wrong?
Thanks so much!
Ariela
If your Revenue Ex Hedge field is an aggregate then the Year([Date]) and Latest Year need to be aggregates too. The easiest thing would be to make the revenue field a non-aggregate.
DeleteHi Andy, I have same problem as Ariela. I am trying to calculate YTD on a aggregated measure. I get the error "cannot compare aggregated and non-aggregated values". If I non-aggregate my measure I don't get the desired results.
ReplyDeleteThank you,
Vishi
Vishu, you likely need to break up your aggregate calc into parts that each separately calc the YTD then combine them into your aggregate.
Delete