Forum Discussion
KPIs using None Standard date Periods
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.
Unfortunately this is embedded in a large file for a customer which I cant share
I always throught for the KPI you had to use date information from a hierarchy for this, so it makes sense that it cant use my flag? But I dont know what to do instead
- kentyler6 years agoSolution Sage
Sometimes when I'm blocked I try and do things a different way. Maybe instead of using your flags you can use a function like
DATESINPERIOD
- 12/09/2018
- 2 minutes to read
Returns a table that contains a column of dates that begins with the start_date and continues for the specified number_of_intervals.
Syntax
DAXCopyDATESINPERIOD(<dates>,<start_date>,<number_of_intervals>,<interval>)Parameters
Term Definition dates A column that contains dates. start_date A date expression. number_of_intervals An integer that specifies the number of intervals to add to or subtract from the dates. interval The interval by which to shift the dates. The value for interval can be one of the following: year, quarter, month, day to develop your non-standard periods... and then you should have the date value to put in your KPI
- DebbieE6 years agoCommunity Champion
Im wondering if I can create a date table with the Min date from Dim date where Rolling 12 month flag is 1 and the end date is Max Date where Rolling 12 Months flag is 1?
Im not sure how to go about it though, or how that will help me with the KPI at the moment
Also If I create a date table will that remove all the date hierarchies from my dates in DimDate? I dont want that to happen
- kentyler6 years agoSolution Sage
A date table is usually recommended for all power bi projects. It would replace, rather than removing your current date hierarchies. There are a lot of issues. Would you like to do a screen share and talk through them. Send me a convenient time and date in an email ([email protected]) and i'll send you a meeting invitation.