Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be 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

Reply
Larryten
Frequent Visitor

Card Visual not showing value

Hi  All


I've got DAX measures that calculates the cumulative planned, actual and forecast. Using the planned and actual, I want to get a performance index on the programme report date so I used the dax measure in the image below. The table shows I'm getting the correct value however it does not appear on the card visual. Even with a report date filter, it does not show. 

Larryten_0-1730378171848.png

Is there another method of displaying that single value?

1 ACCEPTED SOLUTION
v-xianjtan-msft
Community Support
Community Support

Hi @Larryten 

 

Try creating separate measure for card visual using the following DAX:

Performance Index for Card = 
VAR ReportDate = MAX('PlanningData'[ReportDate])
VAR PlannedValue = CALCULATE(
    [Project Functional Planned],
    'S Curve 01 Project Functionals'[TimephaseEnd] <= ReportDate
)
VAR ActualValue = CALCULATE(
    [Project Functional Actual],
    'S Curve 01 Project Functionals'[TimephaseEnd] <= ReportDate
)
RETURN
IF(
    ISBLANK(PlannedValue) || PlannedValue = 0,
    BLANK(),
    DIVIDE(ActualValue, PlannedValue, 0)
)

Then use the [Report Date] field to create a slicer or page level filter.

vxianjtanmsft_0-1730686387899.png

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-xianjtan-msft
Community Support
Community Support

Hi @Larryten 

 

Try creating separate measure for card visual using the following DAX:

Performance Index for Card = 
VAR ReportDate = MAX('PlanningData'[ReportDate])
VAR PlannedValue = CALCULATE(
    [Project Functional Planned],
    'S Curve 01 Project Functionals'[TimephaseEnd] <= ReportDate
)
VAR ActualValue = CALCULATE(
    [Project Functional Actual],
    'S Curve 01 Project Functionals'[TimephaseEnd] <= ReportDate
)
RETURN
IF(
    ISBLANK(PlannedValue) || PlannedValue = 0,
    BLANK(),
    DIVIDE(ActualValue, PlannedValue, 0)
)

Then use the [Report Date] field to create a slicer or page level filter.

vxianjtanmsft_0-1730686387899.png

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

FreemanZ
Super User
Super User

hi @Larryten ,

 

according to your code, it doesn't show anything, because when there is no context, [PlannedValue] returns blank or zero.

hi @FreemanZ 
so what I've done so far is this: 
1) Calculate cumlative values via this code for planned, actual and forecast values:

Project Functional Planned = CALCULATE(SUM('S Curve 01 Project Functionals'[PlannedDurationHours]),FILTER(ALLSELECTED('S Curve 01 Project Functionals'),'S Curve 01 Project Functionals'[TimephaseEnd]<=MAX('S Curve 01 Project Functionals'[TimephaseEnd])))

2)Filter the value for the report date:
Project Functional Planned on Report Date =
VAR ReportDate = MAX('PlanningData'[ReportDate])  -- Obtain the selected Report Date
RETURN
IF(
    MAX('S Curve 01 Project Functionals'[TimephaseEnd]) = ReportDate,
    [Project Functional Planned],
    BLANK()
)

The table shows the values as expected. 
What I want to do is calculate the perfomance index (Actual/planned) based the output value in 2). 
How would I got about this and allow it to show the dynamic value in a card visual?
 
 



Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.