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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.