Forum Discussion

DebbieE's avatar
DebbieE
Community Champion
6 years ago

KPIs using None Standard date Periods

say you have the following KPI based on a Monthly report

Indicator: Fact

Target Goal: Last Month fact

Trend Axis Date (Month from the data hierarchy)

 

But I also have reports based on Time periods that arent Power BI Stanndard so what I have done is add a flag to the time dimension

for example Last 12 months (I have DAX that creates a flag against the last 12 months of dates

Rolling Quarter (Based on business logic) again Ive added a flag agaainst these specific dates.

If I try and create a KPI in the same way for these I cant because Trend Axis isnt a date.

Indicator: Fact

Target Goal: Last Month fact

Trend Axis: Rolling 12 months flag

 

is there anyway I can show these off in exactly the same way using a KPI?

12 Replies

  • kentyler's avatar
    kentyler
    Solution Sage

    This may have to do with how you created your custom time periods. Can you give us an example of how you "set a flag". Thanks

    • DebbieE's avatar
      DebbieE
      Community Champion

      This is my Flag for the Rolling 12 Months

      Rolling 12 Month Flag = IF(DATEDIFF('dim Date'[date].[Date],TODAY(),MONTH)<=12 && DATEDIFF('dim Date'[date].[Date],TODAY(),MONTH)>=0 ,1,0)
       
      And this is the one for Rolling Quarter
      Rolling Quarter Flag = IF(DATEDIFF('dim Date'[date].[Date],TODAY(),MONTH)<=3 && DATEDIFF('dim Date'[date].[Date],TODAY(),MONTH)>0,1,0)
      • kentyler's avatar
        kentyler
        Solution Sage

        It looks like the KPI indicator expects a set of dates. Perhaps you need a measure that selected the dates that have the correct flags....and then create the KPI over that.

        It would help me if you could post a small sample power bi file.