Forum Discussion
Modify YoY% quick measure to filter data points in the future
The quick measure YoY% is giving me results for the future 12 months. I want the YoY% to only match the dates for which there is data (Purchases). My data ends in 12/2017 and I want the YoY% to stop on 12/2017.
Purchases YoY% =
IF(
ISFILTERED('qCalendar'[FirstDayofMonth]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
CALCULATE(
SUM('qPurchaseHistory'[Purchases]),
DATEADD('qCalendar'[FirstDayofMonth].[Date], -1, YEAR)
)
)
Thanks in advance.
Hi dogcat,
You are using a calendar column on your graph right?
Just go on the visual filter and all non blank on the Purchase values will filter out all the dates that are blank in the purchase.
Regards,
MFelix
2 Replies
- dogcatRegular Visitor
Yes on the calendar table. I was trying so hard to filter by date it didn't occur to filter by presence of or lack of a value. Thanks.