March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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 population level it should display the average of the gestational age
>If the program is not prenatal then the card should display nothing
Using my current logic , I am able to get the minimum gestational age but not the average.This the logic that I am using for the card currently,
Solved! Go to Solution.
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,
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,
Thanks a lot ,it worked well.Can you please explain how this works.I want to know more so that I can apply this with other problems as well.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
168 | |
116 | |
63 | |
57 | |
50 |