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
nmaddock
Helper I
Helper I

DAX Check column for value in a measure

Hi,

 

How can I check if the Column matches a value to set a value in a measure. This is what I am trying to achieve.

1.png

Thanks in advanced

Power Bi report below 

https://www.dropbox.com/s/dqsg36arrimeqk7/Power%20BI%20Sample.pbix?dl=0

1 ACCEPTED SOLUTION
PattemManohar
Community Champion
Community Champion

@nmaddock  Please find the updated measure calculation in the pbix file attached. Check and let me know if any isssues.

 





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

Proud to be a PBI Community Champion




View solution in original post

4 REPLIES 4
PattemManohar
Community Champion
Community Champion

@nmaddock  Please find the updated measure calculation in the pbix file attached. Check and let me know if any isssues.

 





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

Proud to be a PBI Community Champion




Perfect, thank you

atif-hafeez
Helper I
Helper I

I do not have the answer to your question, but from what you are trying to you acheive, i think it would be better to create a calculated column. and utilizing related function, use the disposal costs whereever required. 

JIGAR
Resolver IV
Resolver IV

@nmaddock :

 

Hi,

 

Assuming that you want to match the selected value from the Material Type slicer to Glass or Cardboard, you can use the below mentioned formula for your measure. 

 

Disposal Costs = if(OR(SELECTEDVALUE(MaterialTypes[Material Type],"") = "Glass",SELECTEDVALUE(MaterialTypes[Material Type],"") = "Cardboard"),0,DIVIDE(125, 1000))
 
Hope this helps !!
 
Thanks

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.

Top Solution Authors