Forum Discussion

tbucki1's avatar
tbucki1
Icon for Advocate I rankAdvocate I
9 years ago
Solved

KPI card displays incorrect value

I just created a KPI card that shows Actuals Vs Budget for a given time period... Both Actuals and Budget are DAX equations.

I bring Actuals into the "indicatior" section, Budget to "Target Section" and Month Name to Trend Axis...

 

I have a slicer set up to show month name... The KPI number works when viewing on a monthly basis, but as soon I select Jan & Feb & Mar & Apr. & May, etc... the KPI changes and the displayed number is the last months amount. I am not able to see a YTD view based on my selection. In my date slicer if I select Jan through November, the number displayed is the Actuals for November, not the cumulative Actual value of Jan - Nov. This seems to be a Power BI Desktop issue, because it works beautiful in Excel Power Pivot.

 

Power BI does not seem to factor in all the dates checked in the filter, it only looks at the latest or most current month in the selection and displays that months value... How do I correct this? Seems like a bug.

 

Thanks!

  • Hi tbucki1,

     

    To display cumulative totals for Actual and Budget in KPI visual based on checked month from the slicer, you can create two measures to return cumulative total:

     

    RunningAcrual = CALCULATE(SUM(Table2[Actual]),FILTER(ALL(Table2[Month]),'Table2'[Month]<=MAX('Table2'[Month])))

    RunningBudget = CALCULATE(SUM(Table2[Budget]),FILTER(ALL(Table2[Month]),'Table2'[Month]<=MAX('Table2'[Month])))

     

     

     

    Best Regards,
    Qiuyun Yu

3 Replies

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

    This is not a Power BI issue, it is a KPI card feature.  If you use a regular card I think you will find it will behave the same as Excel.  The KPI card is designed to show the last selected value in the time series.

  • v-qiuyu-msft's avatar
    v-qiuyu-msft
    Icon for Community Support rankCommunity Support

    Hi tbucki1,

     

    To display cumulative totals for Actual and Budget in KPI visual based on checked month from the slicer, you can create two measures to return cumulative total:

     

    RunningAcrual = CALCULATE(SUM(Table2[Actual]),FILTER(ALL(Table2[Month]),'Table2'[Month]<=MAX('Table2'[Month])))

    RunningBudget = CALCULATE(SUM(Table2[Budget]),FILTER(ALL(Table2[Month]),'Table2'[Month]<=MAX('Table2'[Month])))

     

     

     

    Best Regards,
    Qiuyun Yu

    • marta_spg's avatar
      marta_spg
      New Member

      Hi @Qiuyun Yu,

       

      I am facing exactly the same problem, but the solution you propose does work for the KPI but then not for the trend value (the line), as it give cummulative evolution view.

       

      When you have daily information, there's really no point in looking at the last day, it would be much better to analyze for example last month (or YTD), and in the trend axis maintain the daily evolution.