Forum Discussion

AlanP514's avatar
AlanP514
Post Patron
4 years ago

Dax issue

Hai Can you help me to find complete this dax.
I was trying to create version flag but unfortunately i am getting this error, please help me to correct this dax




3 Replies

    • AlanP514's avatar
      AlanP514
      Post Patron

      Hai tamerj1 
      Thank you for your quick response, But I already closed the bracket 
      Can you please rewrite this formula based on your perception

  • v-kkf-msft's avatar
    v-kkf-msft
    Community Support

    Hi AlanP514 ,

     

    Not sure what you want the output to be, but in the IF function, the first argument must be any value or expression whose calculation results in TRUE or FALSE, like this.

     

    Version Month Selection Flag =
    VAR Maxversion =
        MAX ( 'T1 Data Base'[Version Flag] )
    VAR Mindate =
        CALCULATE (
            MIN ( 'T1 Data Base'[Attribute] ),
            FILTER (
                ALLSELECTED ( 'T1 Data Base' ),
                'T1 Data Base'[Version Flag] = Maxversion
            )
        )
    RETURN
        IF ( MAX ( 'T1 Data Base'[Attribute] ) >= Mindatee, 1, 0 )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.