Forum Discussion
Create a KPI based on a filter
I'm hoping this is very simple, and has probably been answered but I don't know what to search for to find...
I want to create a kpi to show a filtered value. For example, I have a table like so, and I want a KPI to show 19 - the new accounts added in February.
I have created a measure that evaluates to the last complete billing period of 202002 (202003 is current and not complete)
Something along the lines of the following. I am not sure if NewAccounts is a measure or not, I'm going to guess that it is:
New Measure = VAR __item = [Your last complete billing measure goes here] RETURN MAXX( FILTER( SUMMARIZE('Table',[BillingPeriod],"__NewAccounts",[NewAccounts]), [BillingPeriod = __item ), [__NewAccounts] )
3 Replies
- Greg_DecklerCommunity Champion
Something along the lines of the following. I am not sure if NewAccounts is a measure or not, I'm going to guess that it is:
New Measure = VAR __item = [Your last complete billing measure goes here] RETURN MAXX( FILTER( SUMMARIZE('Table',[BillingPeriod],"__NewAccounts",[NewAccounts]), [BillingPeriod = __item ), [__NewAccounts] )- AnonymousNot applicable
Thanks very much Greg, that worked...now I just have to break it down so I understand it!
- daxCommunity Support
Hi Anonymous ,
You could try below measure to see whether it work or not
MEASURE 3 = VAR MAXDAY=MAXX(FILTER(T2,T2[date]<YEAR(TODAY())*100+MONTH(TODAY())),T2[date]) RETURN CALCULATE(SUM(T2[amount]), FILTER(T2, T2[date]=MAXDAY))or
Measure 2 = CALCULATE(SUM(T2[amount]), FILTER(T2, T2[date]=YEAR(TODAY())*100+MONTH(TODAY())-1))Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.