cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Robi2
Frequent Visitor

AverageX working but Medianx returning blank

I am trying to get a median value from a Summarize table function, but it's returning blank.

If I switch to AverageX I do get a value back.

 

This is my query: 

On Demand Clicks Median = CALCULATE(MEDIANX(
	SUMMARIZE(Analytics,Analytics[User Token],"On Demand Count",CALCULATE(COUNTROWS(Analytics), Analytics[Event Name]="On-Demand")), [On Demand Count]))

So if I switch to AverageX it does work.

Also this function of summarize also works correctly if I view it in a table.

SUMMARIZE(Analytics,Analytics[User Token],"On Demand Count",CALCULATE(COUNTROWS(Analytics), Analytics[Event Name]="On-Demand") 

 Do you know what could be wrong?

 

Thanks,

Robert

1 REPLY 1
v-sihou-msft
Microsoft
Microsoft

@Robi2

 

I can't reproduce your issue. I tried a similar forumula as yours. It can return correct result.

 

777.PNG

 

Can you share some sample data?

 

Regards,

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.