Forum Discussion
Dax Measure issue
- Anonymous1 year ago
Hi Diportee97 ,
Try adding a new column 'Year Month Number' in the calendar table and modifying the measure 'Patient visit pm'.
Patient visit pm = VAR __max_year_month =MAX ( 'Calendar'[Year Month Number] ) VAR __result = CALCULATE ( [Patient Visits], 'Calendar'[Year Month Number] = __max_year_month - 1, REMOVEFILTERS('Calendar') ) RETURN __resultOutput:
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi Diportee97 ,
Try adding a new column 'Year Month Number' in the calendar table and modifying the measure 'Patient visit pm'.
Patient visit pm =
VAR __max_year_month =MAX ( 'Calendar'[Year Month Number] )
VAR __result =
CALCULATE (
[Patient Visits],
'Calendar'[Year Month Number] = __max_year_month - 1,
REMOVEFILTERS('Calendar')
)
RETURN
__result
Output:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum