Forum Discussion
Measure cannot be filtered by Date Slicer
Hi,
I have a measure that was created via "New Quick Measure" to calculate the QoQ% Change based on a calculated column (just the total of column A + B + C).
I'd like to plot these column and the QoQ% Change into a bar and line chart, and add a Date Slicer. However, it seems that the measure cannot be filtered and displayed by the chart when Date Slicer is being adjusted and causes the whole chart to show error.
[Full date period]
[Adjusted Date period]
As I am new to Power BI, I wonder if anyone can shed some light to what might be the solution for this. I believe it is doable to be done in Power BI, but perhaps there is a trick to make it happen...
Best Regards,
Owen
10 Replies
- TheoC
Community Champion
Hi owenkosnen
You can use the following measures:
QTD = CALCULATE ( SUM ( Table[Amount] ) , DATESQTD ( 'Date'[Date] ) )
Last QTR = CALCULATE ( SUM ( Table[Amount] ) , DATEADD ( 'Date'[Date] , -1 , Quarter ) )
QoQ% = ( [QTD] - [Last QTR] ) / [Last QTR]
Ensure to change the measure [QoQ%] to percentage.
Hope this helps.
Theo 🙂
- owenkosnenFrequent Visitor
Hi Theo,
Thanks a lot for your quick response!
I tried your suggestion to create these measures but not sure why I get Infinity as the value for QoQ%. I have made sure to change it to Percentage as well.
- Samarth_18
Community Champion
owenkosnen , Update QoQ% like below:-
QoQ% = divide( ([QTD] - [Last QTR] ), [Last QTR] ,0)
- TheoC
Community Champion
owenkosnen sorry, I had an extra bracket at the end of the QoQ%
QoQ% = ( [QTD] - [Last QTR] ) / [Last QTR]
- owenkosnenFrequent Visitor
Yes I also noticed the extra bracket there but seems it is the issue...
I am ]curious since my base column for (Table[Amount]) is actually a calculated column, could it be the reason why it is not working ?