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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Aabhishek
Regular Visitor

change column based on filter

Hi Everyone,

 

I am trying to write a measure which changes the column used for calculation based on filter selection. 

 

Example: If the selected filter value is A, measure should calculate using column 1, if selected filter value is B, then the measure should calculate using column 2, if nothing is selected, it should calulate using column 3.

 

How do I write this measure?

 

Or I am looking it in a wrong way and need to modify the data model? 

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

@Aabhishek,

 

You may use SELECTEDVALUE Function inside SWITCH Function to add a measure.

 

Community Support Team _ Sam Zha
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

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@Aabhishek,

 

You may use SELECTEDVALUE Function inside SWITCH Function to add a measure.

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.