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
Chris1300
Helper II
Helper II

Measure not working with REMOVEFILTERS function

I have a simple table shown below. I have a measure calculation shown below. 

 

Column1Column2Column3Column4
1a2a4a6
1b2b4b6
0c2c4c6
0d2d4d6
1e2e4e6
1f3f5f7
1g3g5g7
0h3h5h7
1i3i5i7
0j3j5j7

 

Measure = CALCULATECOUNT(Sheet1[Column1]) , REMOVEFILTERS(Sheet1[Column3],Sheet1[Column4]))
 

The measure counts the number of values in "Column 1" but SHOULD NOT include the column 3 and 4 filters when counting. If I filter things in column 3 and 4, while Column2 has no filter it DOES NOT change the measure. This makes sense, below is a screenshot with 3 slicer filters for columns 2,3,4 with card for measure and overall table.

 

Chris1300_0-1668643426951.png

BUT, if I select few items in column2 AND then also select items in Column 3 or 4. The measure seems to break down. It DOES NOT function like its written, where it should remove filters on column3 and 4 for that measure. Below screenshot shows I selected 5 items in column 2 AND 1 item in column3 and 4. The measure here should be 5, buts its 1. I don't understand why this is happening?

 

Chris1300_1-1668643711662.png

 

What am I doing wrong? My end goal is to get a measure that counts column 1, while Column 2 has a filter and ignores filter on columns 3 and 4.

 

1 ACCEPTED SOLUTION

Hi, @Chris1300 

You can try 'Edit interactactions' to change how visuals interact in a Power BI report.

You need select slicer 'Column3',select 'Format'->'Edit interactactions' and then disable its interaction with other visual.This way the results of other visuals will not be filtered by the value of slicer 'Column3'.

Do the same for slicer 'Column4' and  you will get the same Ideal Measure Output.

 

veasonfmsft_0-1669626508143.png

 

Best Regards,
Community Support Team _ Eason

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Chris1300 , Make independent tables for these columns

c3 = distinct(Table[C3])

 

and then use them in filter as per need 

 

 CALCULATE( COUNT(Sheet1[Column1]) , filter(Sheet1,  Sheet1[Column3] in values(c3[Column 3] ) ) )

 

Need of an Independent Table in Power BI - Exclude: https://youtu.be/lOEW-YUrAbE

No that does not work. I think I am not explaning my use case/problem clearly. Let me try again with a matrix of ideal measurement vs my measurement.

 

Recall my measurement is: Measure = CALCULATECOUNT(Sheet1[Column1]) , REMOVEFILTERS(Sheet1[Column3],Sheet1[Column4]))

 

 # of items selected in Column 2 (slicer)# of items selected in Column 3 (slicer)# of items selected in Column 4 (slicer)My Measure OutputIdeal Measure Output
Case 1

None

None

None1010
Case 24NoneNone44
Case 3None421010
Case 442114
Case 542None24
Case 64None224
 
My current measure fails for case 4,5,6 and it works for case 1,2,3. I need a measurement that can output the ideal measurement column.
 
Hope this helps explain my issue.

 

 

 

Hi, @Chris1300 

You can try 'Edit interactactions' to change how visuals interact in a Power BI report.

You need select slicer 'Column3',select 'Format'->'Edit interactactions' and then disable its interaction with other visual.This way the results of other visuals will not be filtered by the value of slicer 'Column3'.

Do the same for slicer 'Column4' and  you will get the same Ideal Measure Output.

 

veasonfmsft_0-1669626508143.png

 

Best Regards,
Community Support Team _ Eason

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.