Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

MEDIANX and SUMMARIZE - need to exclude 0

Hello All!

 

Median =

MEDIANX(SUMMARIZE(GData,GData[Account],
                            "Contacts",CALCULATE(SUM(GData[TotalContacts]),FILTER(GData,GData[TotalContacts] <>  0  )),"FTE", CALCULATE(AVERAGE(GData[L1FTECount]),FILTER(GData,GData[L1FTECount] <> 0 ))),DIVIDE([Contacts],[FTE]))

It seems that it is still including zeros in the median which is why I am still getting the wrong median number. I hope someone can help with how to eliminate 0 in this measure.

Thanks!
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try like

MEDIANX(filter(SUMMARIZE(GData,GData[Account],
"Contacts",SUM(GData[TotalContacts])
,"FTE", AVERAGE(GData[L1FTECount])),[Contacts] <> 0 && [FTE]<>0)
,DIVIDE([Contacts],[FTE]))

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

This works like a charm. Thank you!

amitchandak
Super User
Super User

@Anonymous , Try like

MEDIANX(filter(SUMMARIZE(GData,GData[Account],
"Contacts",SUM(GData[TotalContacts])
,"FTE", AVERAGE(GData[L1FTECount])),[Contacts] <> 0 && [FTE]<>0)
,DIVIDE([Contacts],[FTE]))

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.