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
Anonymous
Not applicable

Using Slicer filter to filter a matrix way to calculate

Hi everyone.

 

I need help with i have a table with data and a column called "country" - that has all european country plus one entry called "Europe".

 

What i need to know is if there's a way to when on the slicer I select "ALL" the calculations on the table shows the values of "Europe", instead of the summarization of all countries plus the Europe row.

 

Thank you in advance for your help.

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try a measure like

 

if(isfiltered(table[country]), count(Table[Value]), calculate(count(Table[Value]), filter(Table, Table[country] ="Europe")))

Anonymous
Not applicable

@amitchandak, didn't worked.

 

My structure is 

 

Table 1 - COD_CTRY with only a Column with all the European countries plus one entry called Europe.

 

Table 2 - TBL_Values with two columns Country and Values

 

When I filter the COD_CTRY in the slicer for example "Austria" the data should be the value for Austria, and when i remove the filters so the slicer has "All" the Europe value should appear, and you solution always shows the Europe value.

 

sorry i had to re-arrange the tables.

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.

Top Solution Authors