Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Creating a measure with filters

I am creating a card visual that has to display the gestational age based on the type of program, >If it is prenatal it should display the appropriate gestational age on patient level and on popul...
  • v-lid-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    We can try to use the following measure to meet your requirement:

     

    Gestational_age =
    IF (
        CALCULATE (
            COUNTROWS ( Overview ),
            Overview[Gestational Age - Copy] <> BLANK ()
        ) = 0,
        BLANK (),
        CALCULATE (
            (
                INT ( AVERAGE ( Overview[Gestational Age - Copy] ) / 7 ) & "W "
                    & ROUND ( MOD ( AVERAGE ( Overview[Gestational Age - Copy] ), 7 ), 0 ) & "D"
            )
        )
    )

     

     

    If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.


    Best regards,