Reputation: 11
For example: In sample superstore there are many days where lowest sales are 4. So I want to display only the point where there was a latest low of 4 and not all the 4's. If one value is repeated more than once then I want to display that value only for the latest date. One more example so that I a clear: lets take 3 dates-
**Order Date ** Sales
July 12, 2022 4
January 28, 2019 4
June 24, 2019 4
Now I want to display lowest. By default tableau will display July 12,2022 as the lowest. But now if I exclude July 12 then tableau next displays Jan 28,2019 which is completely wrong because after July 12,2022 the latest one should be June 24,2019. This is what I want to do. Displayed max and min value should be latest according to date and not ascending wise. I hope my question is clear.
I am not a pro but a beginner so I don't know anything except using measure in label and then selecting show max and min value. I expect that when there are multiple repetitive values then only that value should be selected which is against the latest date. If I exclude this value from the table then the next latest date should be selected. Example. If there is Jan Feb Mar all having same value then Mar should be displayed. If I exclude Mar then next Feb should be displayed and not Jan.
Upvotes: 1
Views: 84
Reputation: 21
start by creating a custom calculation called Min or Max Sales
which will display the Max or Min sales:
// Min or Max Sales:
IF SUM([Sales]) = WINDOW_MIN(SUM([Sales])) OR
SUM([Sales]) = WINDOW_MAX(SUM([Sales]))
THEN
SUM([Sales])
END
Drop this next to your SUM(Sales), to produce two charts:
Right-click on Min or Max Sales
and select Dual Axis.
Click to Synchronize the new axis:
(Tip: if you want to hide this second axis, just uncheck "Show Header" from this same drop-down.)
Click on the marks card for the new axis and change the type from Default to Circle:
You may want to bump up the size of the circle...
...and drop the date and/or Min or Max Sales
amount on the Text card to display it:
I'm not quite following your concerns about displaying only the latest date when filtered. With this formula, if multiple days have the same minimum or maximum Sales volume, a dot will appear for each of those days. If you are having trouble with the order of your dates, right-click on your date dimension, select Sort and Descending.
Upvotes: 0