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

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

Reply
Anonymous
Not applicable

Creating a Slicer to select data from different calculated columns

Hi,

I've created a table with four calculated columns. These are based on inflation rates and have taken data from different years to factor up to 2020. I am now looking to create a slicer based on the four separate inflation rates that will return the data from each column separately in the various tables and graphs I have created.

 

Can anyone advise me of the best way to do this, as I'm struggling at the moment. 

 

Many thanks

 

David

3 REPLIES 3
MFelix
Super User
Super User

Hi @Anonymous ,

 

Not really sure how you have your setup but if you create a disconnected table with the reference that you need something similar to:

 

Reference
Column1
Column2
Column3
Column4

 

The you can use a switch function to get the values you need for example:

 

Values calculation=
Switch( 
SELECTEDVALUE(Table[Reference]),
"Column1", SUM(AnotherTable[Column1),
"Column2", SUM(AnotherTable[Column2),
"Column3", SUM(AnotherTable[Column3),
"Column4", SUM(AnotherTable[Column4),
)

Now use this measure on your visuals and the table above on your slicer.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Miguel,

Thank you for your response, I'm not sure if I've set up my tables incorrectly, but this doesn't seem to be working for me. I've created the measure, but I'm not sure what I should use for the Reference. I need to think about the layout before trying this out.

Many thanks

David

Hi @Anonymous 

 

The reference is just a table that you can call whatever you want and place the name of the column you need to calculate and change, then if you select that table and make the calculations according to the measure your charts should change.

 

Check PBIX file attach with a small example:

MFelix_0-1635521665333.png

 

 

MFelix_1-1635521677118.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.