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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
caduwek
Frequent Visitor

Switch based on the columns

Hello,

 

I have many calculated fields (100+) which I would like to add into the graph based on the sellection. Graph should show only one metric which I choose in the dropdown menu.

 

For this I created table where is name of these metrics (which I would like to select) and name of the calculated fields (calculation behind) :

 

Name metric                name calculated field

number of clients         cnt_client

amount of credit           amt_credit

...

...

...

 

Then I have there switch which chose calculated field based on the sellected name. 

Bu question:  Is possible to create switch like

 

switch(table[Name metric], selected table[Name metric], '[table[name calculated field]]' - take calculated field which has same as in the table) in one row instead write every possibility for each name metric one by one?

 

Thank you

 

 

2 REPLIES 2
v-lionel-msft
Community Support
Community Support

Hi @caduwek ,

 

Maybe.  Can you give a specific example data?

 

Best regards,
Lionel Chen

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

amitchandak
Super User
Super User

I think this link can help. But seems like you already have this method

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors