Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Return a Value

Hello everyone   I would like to return a value from a column that is the result of an IF, the value I want to return is a column when the value meets some condition: IF(Table1[value] >= "98", Tab...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anand24 

     

    The example could be something like this, there is another data but for the calculation I need, is based on this two fields, as you can see, it returns only one value, but in the data, there is 3 values that are "true" based on the expresion:

    Column = IF(Table1[value] >= "98%", Table1[value2])

     

     

     

    Value1Value2Result
    50%BD1BD5
    45%BD2BD5
    98%BD3BD5
    99%BD4BD5
    100%BD5BD5

     

    On the table chart, it appears as Fist of Column, maybe that could be the error, there is a way to change that too?

     

    Best Regards and thanks for your help

  • Anand24's avatar
    Anand24
    5 years ago

    Anonymous ,
    I'm able to understand your query very vageuly but Try creating a calculated measure with the same formula.
    Also, what should be shown for false cases? In your example, for 50% and 45%.

     

    Try the below DAX as well:
    Conditional Measure = IF(Table[Value1] >= 0.98,Table[Value2],BLANK())

     

    Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

    Proud To Be a Super User !!!
    LinkedIn

  • v-luwang-msft's avatar
    5 years ago

    Hi Anonymous ,

    Base data:

    Column = IF('Table'[Value1]>= 0.98, 'Table'[Value2])

    The result output is correct.And Check your value1 type,if question still not solved ,could you pls share your pbix flie?

    And remember to remove confidential data.

     

     

    Best Regards

    Lucien