Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I am trying to create a DAX measure to median and mean to show only whole month activity, as per the chart below, the trend dips in July as it does not include the full month data, internally the data warehouse is refreshed mid month and therefore would have this issue every month. This is there a measure that I could use that would only include data for a entire month and not partial month activity, so for the chart below I would like to show all data upto end of June.
Currently I just have a simple measure to calulate ether mean or median;
Thanks
Nagin
Solved! Go to Solution.
@Nagin
I made the measure for Mean, you can repeat the same for Median
LOS Mean =
IF(
EOMONTH( MAX(ECDS[Admission_Date_Hospital_Provider_Spell]),0) <=
CALCULATE( MAX(ECDS[Admission_Date_Hospital_Provider_Spell]), REMOVEFILTERS(ECDS)) ,
AVERAGE(ECDS[Hospital_Spell_Duration_D])
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Nagin
I made the measure for Mean, you can repeat the same for Median
LOS Mean =
IF(
EOMONTH( MAX(ECDS[Admission_Date_Hospital_Provider_Spell]),0) <=
CALCULATE( MAX(ECDS[Admission_Date_Hospital_Provider_Spell]), REMOVEFILTERS(ECDS)) ,
AVERAGE(ECDS[Hospital_Spell_Duration_D])
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
19 |