cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
charlie77
Helper II
Helper II

How to use the result of a slicer in a new column

Hi

I have a data table with three columns with headings of "A", "B", and "C", respectively, and a slicer with "A", "B" and "C" three options. I wish to create a forth column which deplicates "A", "B", or "C" depending on the selection of the slicer e.g. if select "A" in the slicer, the 4th column of the table will be a duplication of column "A". Is there anyone who could provide a solution?

 

Many thanks

Charlie77

 

1 ACCEPTED SOLUTION
Eyelyn9
Community Support
Community Support

Hi @charlie77 ,

According to my understand, the calculated column could not be dynamical ,so use the following measure instead:

 

duplication =
SWITCH (
    SELECTEDVALUE ( ForSlicer[SlicerValue] ),
    "A", MAX ( 'DuplicationTable'[A] ),
    "B", MAX ( 'DuplicationTable'[B] ),
    "C", MAX ( 'DuplicationTable'[C] )
)

9.9.3.1.png

Did I answer your question ? Please mark my reply as solution. Thank you very much.

If not, please upload some insensitive data samples and expected output.

 

Best Regards,

Eyelyn Qin

View solution in original post

4 REPLIES 4
Eyelyn9
Community Support
Community Support

Hi @charlie77 ,

According to my understand, the calculated column could not be dynamical ,so use the following measure instead:

 

duplication =
SWITCH (
    SELECTEDVALUE ( ForSlicer[SlicerValue] ),
    "A", MAX ( 'DuplicationTable'[A] ),
    "B", MAX ( 'DuplicationTable'[B] ),
    "C", MAX ( 'DuplicationTable'[C] )
)

9.9.3.1.png

Did I answer your question ? Please mark my reply as solution. Thank you very much.

If not, please upload some insensitive data samples and expected output.

 

Best Regards,

Eyelyn Qin

Hi Eyelyn

Thank you so much for the ingenious solution. Yes, it's exactly what I wanted. 

Thanks again. 

Charlie77

amitchandak
Super User
Super User

@charlie77 , The information you have provided is not making the problem clear to me. Can you please explain with an example.

Check if these can help

 

measure slicer
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...


Dynamically change chart axis in Power BI
https://www.youtube.com/watch?v=6jeSIRpjv0M
https://www.youtube.com/watch?v=vlnx7QUVYME

 

 


Appreciate your Kudos.




Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

 

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors