Reputation: 23
I am working on a report where I need to change the value of a measure, let's say measure A, based on the parameter value, but only for the country selected in the slicer.
So I have this table visual that shows continents, countries, flags and a lot of measures. All of the data comes from the source name "DATA", besides the flag which is coming from a custom table I made that stores country names and flag links.
Then I created this parameter, "Param" and the Country filter which is based on the name of the countries from the Country table.
I changed the "A" measure formula to add the parameter to it when the country is filtered, but only for the country that is filtered.
A = IF(ISFILTERED(Countries[Country]),[B] - [C] - [D] + 'Param'[Param Value], [B] - [C] - [D])
When I change the value of the parameter and apply a country filter the measure A is calculated correct for the country selected, but for the others all the values of the measures in the table dissapear.
Do you have any idea what I can do to make change only the A measure of the country selected in the filter without changing the values for the other countries at all?
Upvotes: 0
Views: 1834
Reputation: 1
Have you tried this forumla might get what you actually need.
easue= Switch ( True(),
if(condition1,"Result1" ,
if(condition1,"Result1" , etc... )
And for the slicer this link actually explains how to use it.
https://www.enjoysharepoint.com/power-bi-measure-switch/
Upvotes: 0