Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |