Forum Discussion

CReportify's avatar
CReportify
Frequent Visitor
1 year ago

KPI card visual and Calculation groups

Hi guys,

 

I want to use calculation groups time intelligence because its efficiënt and easy to use. But, I also want to use the KPI card visual where I want to compare current year with last year. Is this possible when using Calculation groups measures?

 

Thanks in advance.

3 Replies

  • Hi  CReportify ,

    Yes, it's possible. You can use Calculation Groups for time intelligence and still compare current year vs. last year in the KPI card. Just create a calculation item in the Calculation Group for "Last Year" and set it up to return the previous year's value. Then, you can use the KPI card to compare the current year's measure against the "Last Year" calculation item. This works seamlessly in Power BI.

    Create a Calculation Group for Time Intelligence

    SELECTEDMEASURE()

    Last Year (LY):

    CALCULATE(SELECTEDMEASURE(), SAMEPERIODLASTYEAR('Date'[Date]))

    This sets up a Calculation Group with two items: one for the current year and one for last year.

    Apply the Calculation Group to a Measure

    Now, create a measure for something like

    Sales = SUM('Sales'[Amount])
    1. Drag your Sales measure into a table or any visual.

      Use the KPI Card Visual

      1. Add a KPI Card visual.
      2. In the Values field of the KPI Card, add the Sales measure (or any other measure).
      3. In the Indicator field of the KPI Card, use the "Time Intelligence" Calculation Group.
      4. For the Trend axis, you can use the Date field.

    Now, the KPI card will show the current year sales by default, and when you select the "Last Year" Calculation Item, it will compare the current year's sales against last year's sales.

    Please mark this as solution if it helps you. Appreciate Kudos

    • CReportify's avatar
      CReportify
      Frequent Visitor

      Hi Farhan,

       

      Thanks for your answer It works adding the sales measure to the value field of the KPI visual and the date function to the trend axis. But, when dragging the Time Intelligence to the target box It doesn't work.


      Kind regards,

       

      Creportify