Forum Discussion
Anonymous
8 years agoNot applicable
YTD - Quick Measure for YOY
Hi all,
I am trying to create this report for my sales team:
| Customer | 2015 YTD Sales | 2016 YTD Sales |
| ABC | 10000 | 11000 |
| DEF | 20000 | 22000 |
| XYZ | 30000 | 33000 |
I am using this a quick measure with this DAX:
OrderTotal YTD =
IF(
ISFILTERED('DateDim'[DIMDATE]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy."),
TOTALYTD(SUM('OrderHeaderDim'[OrderTotal]), 'DateDim'[DIMDATE].[Date])
)
I recieve this result:
I would expect not to see November and December for 2016. I have also tried writing my own DAX but get the same result.
Thank you in
3 Replies
- Ashish_Mathur
Super User
Hi,
Try this
=IF(ISBLANK(SUM('OrderHeaderDim'[OrderTotal])),BLANK(),IF( ISFILTERED('DateDim'[DIMDATE]), ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy."), TOTALYTD(SUM('OrderHeaderDim'[OrderTotal]), 'DateDim'[DIMDATE].[Date]) ))Hope this helps.
- AnonymousNot applicable
Thanks for your reply! Sorry didn't work. Here is the result:
As you can see October, November and December are showing for 2016.
- Ashish_Mathur
Super User
Hi,
Share the link from where i can download your file.