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.
This has been a real headache, I have been trying to create a calculated column (has to be a calc. col.) that gets me the median value for each "UnitType". The challenge I am encountering is that calculation is accounting for the 0 or null values in the "Dev/Known" column, so the median is either inaccurate or I get a 0 value for an answer (due to all the zeros and nulls). What can I do to get around this?
Thank you!
Solved! Go to Solution.
Will this work?
Median Dev/Known =
VAR varUnitType = [UnitType]
RETURN
MEDIANX(
FILTER(
ALL( 'Project Data' ),
[UnitType] = varUnitType
&& NOT [Dev/Known]
IN {
0,
BLANK()
}
),
[Dev/Known]
)
It will filter the table to exclude rows where the Dev/Known field is zero or null.
I also got rid of the Earlier function. Pet peeve of mine since variables came out. 😉
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingWill this work?
Median Dev/Known =
VAR varUnitType = [UnitType]
RETURN
MEDIANX(
FILTER(
ALL( 'Project Data' ),
[UnitType] = varUnitType
&& NOT [Dev/Known]
IN {
0,
BLANK()
}
),
[Dev/Known]
)
It will filter the table to exclude rows where the Dev/Known field is zero or null.
I also got rid of the Earlier function. Pet peeve of mine since variables came out. 😉
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThis is exactly what I was looking for! Thank you!
Great @RiskyBiscuts - glad to help.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCovering 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 |
---|---|
113 | |
103 | |
76 | |
66 | |
63 |
User | Count |
---|---|
142 | |
105 | |
102 | |
81 | |
68 |