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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Select value from a column based on another column's value, and make it oblivious to user clicks

I have only one table containing several cities for which I use a slicer, and several revenue categories that I use in various visualizations and smart narrative cards. Every city is listed five times in my data.

 

Here is what my data table looks like. How do I select and only this:

 

The value of Municipal GDP Total where GDP Domain is "Culture Total"

 

I am currently using the formula below, but the problem is that if a user clicks on a segment of a pie chart, the total changes.

 

VAR _total = CALCULATE(SUM('infoGDP2010'[Municipal GDP Total]),FILTER('infoGDP2010','infoGDP2010'[GDP Domain]="Culture Total"))
 

{BB9D98AB-F200-4BDD-906C-1F5AE2A307CD}.png

7 REPLIES 7
Anonymous
Not applicable

Thank you @Anonymous and @lbendlin but my issue remains unchanged.

Below are screenshots to show what is happening. When the user clicks a category, the gdp number should not be affected; in this example it should remain 39.89 M$.

 

At the moment, the only way I have found to prevent user interaction from changing that number is to place a transparent rectangle on top of the entire region I wish to be click-disabled. It feels like a clunky workaround which is why I am looking for a solution involving dax code or powerbi features. 'Edit interactions' is not an option because my total dgp number is a smart narrative card and is not linked with 'Edit interactions'.

{31F67633-4E0E-4634-A3F7-7E74A5B71370}.png

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Anonymous
Not applicable

Here is a sample pbix file and the table data.
If you click on a category - etiher on the donut chart or one of the labels on the right - the total should not change.

Currently, the dax formula will display 'Error: a category is selected' if you click on a category.

CityProvincePer CapitaSalary 2016YearData TypeGDP DomainMunicipal GDP TotalJobs DomainMunicipal Job TotalProvincial GDPProvincial JobsProvincial GDP RoundedProvincial Job Rounded
OuagadougouKadiogo362148,4772020Top 3 Domains_1Audio604598859Audio52882819552900026903428.2 B269 K
OuagadougouKadiogo362148,4772020Top 3 Domains_2Visuals443556842Visuals49192819552900026903428.2 B269 K
OuagadougouKadiogo362148,4772020Top 3 Domains_3Written321891340Written41062819552900026903428.2 B269 K
OuagadougouKadiogo362148,4772020Other Domain TotalOther domains868622979Other domains83822819552900026903428.2 B269 K
OuagadougouKadiogo362148,4772020Culture TotalCulture Total2238670018Culture Total226982819552900026903428.2 B269 K
OuagadougouKadiogo362148,4772020Proportion of ProvincialProportion of Provincial7.94Proportion of Provincial8.442819552900026903428.2 B269 K
Kuala LumpurSenlangor334859,8882020Top 3 Domains_1Audio382915284Audio32052819552900026903428.2 B269 K
Kuala LumpurSenlangor334859,8882020Top 3 Domains_2Visuals258501841Visuals22552819552900026903428.2 B269 K
Kuala LumpurSenlangor334859,8882020Top 3 Domains_3Written201500527Written21732819552900026903428.2 B269 K
Kuala LumpurSenlangor334859,8882020Other Domain TotalOther domains2221232802Other domains196522819552900026903428.2 B269 K
Kuala LumpurSenlangor334859,8882020Culture TotalCulture Total3064150456Culture Total272862819552900026903428.2 B269 K
Kuala LumpurSenlangor334859,8882020Proportion of ProvincialProportion of Provincial10.87Proportion of Provincial10.142819552900026903428.2 B269 K

Did you mean to link to the pbix ?

Anonymous
Not applicable

I've edited my previous message with this link to the pbix file :

https://drive.google.com/file/d/1hRcdILqbfPbMHG8mDFZp_gXVJ3NhHrvZ/view?usp=sharing

Anonymous
Not applicable

Hi @Anonymous ,

Please have a try.

f =
CALCULATE (
    SUM ( 'infoGDP2010'[Municipal GDP Total] ),
    FILTER ( 'infoGDP2010', 'infoGDP2010'[GDP Domain] = "Culture Total" ),
    ALLSELECTED ()
)

The allselected()  function will ignore any filters applied by the user, including slicers, and return the total value for the selected context .

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

read about REMOVEFILTERS()

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors