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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

scalar max of measure/dynamically filtering insignificant sources

Hi folks. 

I am trying to clean up some graphs by filtering out sources with insignificant contribution.  Example, with y-values a measure:

cabliewA_0-1683724361546.png

the "blank" sources are just small. Because the amounts vary substantially by selection/navigation, I can't filter the graphic by a static number like 100 or even 10k because depending on source selection, it would still show insignificant sources or no data at all.


If I could create a measure filter_measure = log10([max of shown measure]/[shown measure]). then I can filter the graphic to only show sources within several orders of magnitude of the max value in the graph. Eg: [filter_measure] < 3.

I can't figure out how to calculate the "[max of shown measure]" part, though. I can't use calculated columns because the max is selection-specific.  I've tried a lot of the solutions using maxx, but all of them evaluate to 1 because maxx is evaluated within the context of the selection, so MAXX[shown measure] = [shown measure]. I've seen some solutions with calculate(), but I'm not adding a filter. I thought about using summarize because I'm trying to convince PowerBI to "forget" the row-based context for the purposes of calculating this max and generate a table with only a single row corresponding to whatever source is generating the max.

I figure there's gotta be an easier way. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

A clever peer gave me the answer: MAXX(ALL([table])[shown measure] made everything magically work. Here's my final filtering measure = 
if([shown_measure] = 0, 10, LOG10(MAXX(ALL[table]),[shown measure])/[shown measure])

and graphic filter set final filtering measure < 3.  

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

A clever peer gave me the answer: MAXX(ALL([table])[shown measure] made everything magically work. Here's my final filtering measure = 
if([shown_measure] = 0, 10, LOG10(MAXX(ALL[table]),[shown measure])/[shown measure])

and graphic filter set final filtering measure < 3.  

Syk
Super User
Super User

Try something like this

max measure = VAR SummarizedTable =
SUMMARIZE(
    'Table',
    'Table'[Category],
    "Sum of Values", SUM('Table'[Value])
)
return
maxx(SummarizedTable,[Sum of Values])

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.