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

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.

Reply
zausten
Helper I
Helper I

Filter on Summarised table

Hi,

Is it possible to filter a summarised table based on a column or measure in the table ?

I want to apply a filter on summarizedtable to say where Measure 1 > 10 or the summarised Fact 1 > 10 .

I have tried to create a calculattable function on summarizedtable , but dont seem to be able to filter by  FACT1 and get a "placeholder" error using the measure. 

Basically this equivalent of doing  "having" in sql statement

 

Any ideas

thanks!

 

MyMeasure =

var dim1_type = SELECTEDVALUE(Table1[DIM1])

 

var fitleredtable = CALCULATETABLE(Table1, REMOVEFILTERS( Table1[DIM2]), Table1[DIM1] = dim1_type)

 

var summarizedtable = SUMMARIZE(fitleredtable, [DIM1], [DIM2], [FACT1], "Measure1", 'Measure Table'[Measure1])

 

var other stuff...

return ......

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@zausten , You filter like

 

filter( SUMMARIZE(fitleredtable, [DIM1], [DIM2], [FACT1], "_Measure1", 'Measure Table'[Measure1]) ,[_Measure1] <10)

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@zausten , You filter like

 

filter( SUMMARIZE(fitleredtable, [DIM1], [DIM2], [FACT1], "_Measure1", 'Measure Table'[Measure1]) ,[_Measure1] <10)

@amitchandak 

Wow that simple!  thanks for the tip.  looks like its working as expected. assume if you want to add multiple conditions you need to just wrap in multiple filter bys .
e.g. 
filter(filter( SUMMARIZE(fitleredtable, [DIM1], [DIM2], [FACT1], "_Measure1", 'Measure Table'[Measure1]) ,[_Measure1] >10),[_Measure1] <20)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.