Forum Discussion
Display descrete values above line
I have a table which contains daily sales:
- a column containing sales
- a column containing unique dates (yyyy-mm-dd)
I ranked it by selected time slot and I took the highest ones:
MaxSales :=
VAR SalesRank =
RANKX ( ALLSELECTED ( DailySales ); [SalesAmount] )
RETURN
IF ( SalesRank = 1; DailySales[SalesAmount] )
I have a line chart that displays monthly sales
I want to display the months where the best daily sales was. For instance, from January to July, the best daily sales was 40, on February 23; then the result would be a dot (or a bar) displayed on February, above the line:
Because the time granularity is not the same for the line (monthly) and the dot (daily), I am not able to create this graph.
How is it posible to achieve this?
Hi Grop,
You could refer to my sample to see whether it work or not.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- dax
Community Support
Hi Grob,
You could try to refer to my sample, create Y-M column(column2), then set column2 sort by column1. And use below measure it should work.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Thank you for your answer, it does partially solve the problem.
But as you can see, in your report, MaxSales shows 21 in June. My question is how to make it display 20, which is the amount of June 5 and the maximum for all the dates in the table.
To come back to my example, I want MaxSales to show 40 and not 3,6k (which is the sum of all sales in the month).
Maybe I have to modify the way I calculated MaxSales.
If yes, then how can I write a measure that fits my requirements?
- dax
Community Support
Hi Grop,
You could refer to my sample to see whether it work or not.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.