Forum Discussion

owenkosnen's avatar
owenkosnen
Frequent Visitor
4 years ago

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's avatar
    TheoC
    Icon for Community Champion rankCommunity 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 🙂

    • owenkosnen's avatar
      owenkosnen
      Frequent 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.
       

    • TheoC's avatar
      TheoC
      Icon for Community Champion rankCommunity Champion

      owenkosnen sorry, I had an extra bracket at the end of the QoQ%

       

      QoQ% = ( [QTD] - [Last QTR] ) / [Last QTR] 

       

       

       

      • owenkosnen's avatar
        owenkosnen
        Frequent 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 ?