简体   繁体   中英

Power BI: change measure value based on parameter input and slicer

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?

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM