Forum Discussion
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.
Thanks in advanced
Power Bi report below
https://www.dropbox.com/s/dqsg36arrimeqk7/Power%20BI%20Sample.pbix?dl=0
nmaddock Please find the updated measure calculation in the pbix file attached. Check and let me know if any isssues.
4 Replies
- JIGAR
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 - PattemManohar
Community Champion
nmaddock Please find the updated measure calculation in the pbix file attached. Check and let me know if any isssues.
- nmaddock
Helper I
Perfect, thank you
- AnonymousNot applicable
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.