Forum Discussion
Avivek
Post Partisan
5 years agoNeed help with the DAX
I am trying to create a measure with the following logic, If last 1 completed month and the current month is selected then show the Total Exp. Usage Projected for only current month, if last 2 month...
Pragati11
Super User
5 years agoHi Avivek ,
You will need to provide details to your query. It doesn't make it clear. refer following:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Thanks,
Pragati
- Avivek5 years ago
Post Partisan
I am using an existing measure
Tot. Act. proj. Mon. Usage = [Act. proj. Mon. Usage]+[Act. Last2 Mon Comp.Usage]
where
Act. proj. Mon. Usage = ([Act. proj. Usage]/max('DO Vs Tag'[Completed Bus Days]) *max('DO Vs Tag'[Cur Month No of Bus Days]))Act. Last2 Mon Comp.Usage = CALCULATE(count('DO Vs Tag'[Procedure Credit Owner]), FILTER('DO Vs Tag','DO Vs Tag'[Last 2 Mon Procedure]=1))
The 1st part of the measure that is Act. proj. Mon. Usage will remain as it is. I need to change Act. Last2 Mon Comp.Usage toAct. Last N Mon Comp.Usage where last N month should show the following logics;
- When current month and the last completed month is selected then it should show only for the current month. For eg- When Sep and Oct are selected then show only Oct projection as Tot.Proj
- When current month and the last 2 months are selected then it should show the current month and the last completed month, Eg.,Aug, Sep and Oct are selected then show Sep+Oct as tot proj.
- When current month and last 3 months are selected then it should display Current month and the last 2 completed months. For eg If July, Aug, Sep and Oct is selected, show Aug+Sep+Oct as tot proj.