Forum Discussion

nmaddock's avatar
nmaddock
Icon for Helper I rankHelper I
7 years ago
Solved

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

4 Replies

  • JIGAR's avatar
    JIGAR
    Icon for Resolver IV rankResolver 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
  • Anonymous's avatar
    Anonymous
    Not 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.