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
ingvild_eline
Regular Visitor

Use slicer to change values of rows, while not removing the others

Hi, 

I have a problem using my slicer only to switch the value of a row between two columns, while keeping the other values in my visual.
 

You can see the slicer below:

ingvild_eline_0-1656937492866.png

In the table below, "Mål 4" change between the value of "Referanseverdi" when I am not choosing the "Sektor" in the slicer above, and " Tiltaksbane.tiltaksverdi" when I choose the "Sektor" in the slicer above. My problem is, I want to keep the original values of the rows that are not chosen. Right now, they disappear when I do not select them. 

ingvild_eline_1-1656937684291.png

My ultimate goal is to make the "mål 4" graph below change dynamically according to my choices in the slicer.

ingvild_eline_2-1656937760665.png

 

I appriciate the help.

 

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @ingvild_eline , 

 

Is that you want to the "Mål 4" change to " Tiltaksbane.tiltaksverdi" values the category is selected in the slicer.

 

First, you need to create a table for slicer to select the Sektor via Slicer = values('table'[Sektor])

Then, a measure like the following to calculate the Mål 4

Mål 4 =
IF (
    ISFILTERED ( slicer[Sektor] ),
    CALCULATE (
        [Measure2],
        FILTER ( 'Table', [Sektor] IN VALUES ( slicer[Sektor] ) )
    ),
    [Measure1]
)

 

Result:

vchenwuzmsft_0-1657182688184.gif

 

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

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

 

View solution in original post

3 REPLIES 3
v-chenwuz-msft
Community Support
Community Support

Hi @ingvild_eline , 

 

Is that you want to the "Mål 4" change to " Tiltaksbane.tiltaksverdi" values the category is selected in the slicer.

 

First, you need to create a table for slicer to select the Sektor via Slicer = values('table'[Sektor])

Then, a measure like the following to calculate the Mål 4

Mål 4 =
IF (
    ISFILTERED ( slicer[Sektor] ),
    CALCULATE (
        [Measure2],
        FILTER ( 'Table', [Sektor] IN VALUES ( slicer[Sektor] ) )
    ),
    [Measure1]
)

 

Result:

vchenwuzmsft_0-1657182688184.gif

 

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

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

 

ingvild_eline
Regular Visitor

Hi, thank you for your answer. I am a bit unsure if that will solve my problem, mabye I did not formulate my question well. My problem is that I have two columns that I fetch values from. Initially all values are fetched from column one and added together, but if I choose a category in the slicer I want to fetch values from the second column for the chosen category, and then add them together with the other values. Thus I want to change the values of rows corresonding to the selected category. Is this possible?

amitchandak
Super User
Super User

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.