Forum Discussion

Nagin's avatar
Nagin
Frequent Visitor
4 years ago
Solved

Whole Month Activity

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...
  • Fowmy's avatar
    4 years ago

    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])
    )