Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

How can I add a measure while using If function?

Hi Everyone,   It is hard for me to add a measure like below: Any help is appreciable. Thank you in advance!   Regards, Kelly
  • MFelix's avatar
    8 years ago

    Hi Anonymous,

     

    Add the following measure:

     

    Measure =
    IF (
        HASONEFILTER ( Table1[Group] ),
        IF (
            MAX ( Table1[Group] ) = "D",
            5,
            DIVIDE ( SUM ( Table1[Column1] ), SUM ( Table1[Column2] ) )
        ),
        DIVIDE ( SUM ( Table1[Column1] ), SUM ( Table1[Column2] ) )
    )

    Regards,

    MFelix