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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

How to filter with a sumx measure that creates a visual table

When I create a measure with sumx that creates a visual table, I can only filter in the matrix and or table.
The question is that I want to gain insight into whether the traffic of our website fills hotels that are not filled by the competitor. Sometimes we fill hotels together and sometimes we cover it because they can't do it.

The two measures come from two aparate fact tables.

measure 1 SUM X Covering competitor =
var hotel_c =
CALCULATE(IF([weekplanning_competitor] >= 1,1,0 ))
Return
 SUMX(addcolumns(summarize(
  'Total_planningcompetitor','Total_planningcompetitor'[name_hotels],'Total_planningcompetitor'[week_number]),
    "p", hotel_c),[p])

measure 2  
SUM X Covering  =
var hotel =
CALCULATE(IF([weekplanning] >= 1,1,0 ))
Return
 SUMX(addcolumns(summarize(
  'Total_planning','Total_planning'[name_hotels],'Total_planning'[week_number]),
    "w", hotel),[w])

For the filtering of the matrix and table I use this measure. But could I also process this in measure 1 & 2, for example?

measure 3 Correction sumx = IF(([SUM X Covering competitor] =  
[SUM X Covering ]) && [SUM X Covering competitor] <> BLANK() && [SUM X Covering] <> BLANK(),1,0)

1.png

The outcome I need to have to use it in other visualizations

2.png

I hope someone can help me. Thanks in advance.



2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , You can use visual level filter

 

or

 

Sumx(filter(Values(Table[Name_of_hotel]), [SUM X Covering] =1) , [SUM X Covering])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Anonymous
Not applicable

This works : 

Filter covering =
Sumx(FILTER(Values('table[Name_of_hotel]),
[SUM X Covering competitor] = BLANK() && [SUM X Covering]=1),
[SUM X Covering])

View solution in original post

6 REPLIES 6
msbiuser1
Advocate I
Advocate I

Yes @saravanan_p  that works. @Anonymous Hence the solution, simple. Kindly mark it as solution plz

amitchandak
Super User
Super User

@Anonymous , You can use visual level filter

 

or

 

Sumx(filter(Values(Table[Name_of_hotel]), [SUM X Covering] =1) , [SUM X Covering])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Your logic is wrong, it yeilds all data for all sumx coverng = 1. And @Anonymous  how can this get acccepted as solution. Anyways keep community healhty by supporting other non super users too.

Anonymous
Not applicable

This works : 

Filter covering =
Sumx(FILTER(Values('table[Name_of_hotel]),
[SUM X Covering competitor] = BLANK() && [SUM X Covering]=1),
[SUM X Covering])
Anonymous
Not applicable

It does not work in the filterpane for a another visualisation.. only for a matrix or table


1.png

saravanan_p
Resolver III
Resolver III

Use filter pane and go to field weekplanning_Competetor and uncheck other values and check only blanks. Your result would be populated. 

KIndly give thumps up and mark as solution

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors