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
Anonymous
Not applicable

Creating filter from Measure ( DAX formula )

Hello everyone ,

 

I would lilke to know if there is any DAX formula that could help me creating filter using those mesures.Such that i can easily switch between any of those mesures ( values ) using a filter.

akerrout_1-1652971405780.png

Best regards, 

Kerrout Anis 

2 ACCEPTED SOLUTIONS
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Below is my solution.

1.Create a table with meausre names by entering data.

vstephenmsft_0-1653272653329.png

2.Create a measure with SWITCH( ) function to show the different results of measures.

Measure = SWITCH(SELECTEDVALUE('Table'[Measure name]),"Measure1",[Measure1],"Measure2",[Measure2],"Measure3",[Measure3])

Here's the results.

vstephenmsft_3-1653273218343.png

vstephenmsft_4-1653273224440.png

vstephenmsft_5-1653273229728.png

 

 

 

Best Regards,

Stephen Tao

 

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

Ashish_Mathur
Super User
Super User

Hi,

You need to use Field Parameters - Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Docs.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thank you Stephen !

Ashish_Mathur
Super User
Super User

Hi,

You need to use Field Parameters - Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Docs.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Below is my solution.

1.Create a table with meausre names by entering data.

vstephenmsft_0-1653272653329.png

2.Create a measure with SWITCH( ) function to show the different results of measures.

Measure = SWITCH(SELECTEDVALUE('Table'[Measure name]),"Measure1",[Measure1],"Measure2",[Measure2],"Measure3",[Measure3])

Here's the results.

vstephenmsft_3-1653273218343.png

vstephenmsft_4-1653273224440.png

vstephenmsft_5-1653273229728.png

 

 

 

Best Regards,

Stephen Tao

 

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

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.