Forum Discussion

Akhil_1411's avatar
Akhil_1411
Icon for Helper IV rankHelper IV
6 years ago
Solved

Selected value function is not giving the correct result

Hi All,

 

Mine is very basic requirement. It just the selected value of the calendar date lesser than the bill date then give me 1 else 0.

But, when i tried in power bi dax it is not giving the right result. Can anyone help me where i am going wrong or any suggestions.

 

 

Power BI Screenshot

 

Thanks,

Akhil.

  • Akhil_1411 try the following measure, change the logic as per your needs.

     

     

    flag = 
    IF ( MAX ( Table[BillDate] ) < SELECTEDvALUE ( DateTable[Date] ), 1, 0 )

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

     

     

6 Replies

  • Akhil_1411 try the following measure, change the logic as per your needs.

     

     

    flag = 
    IF ( MAX ( Table[BillDate] ) < SELECTEDvALUE ( DateTable[Date] ), 1, 0 )

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

     

     
    • Akhil_1411's avatar
      Akhil_1411
      Icon for Helper IV rankHelper IV

      parry2k ,

       

      Tried the below logic also, but it is not giving the desired result. Please check below screenshot attached.