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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MrAnderson72
Frequent Visitor

PowerBI Metrics is not presenting the last value from a PBI Report graph

Hello,

 

I'm trying to connect a Power BI Scorecard Metric with a PowerBI Report Graph.

This graph is composed by:

X axis - Week of the year

Y axis - A measure with the following formula: DistCountResultAdjusted = IF(([DistCountResult] = 0), 0, [DistCountResult])

 

This measure was just created so I can have a value of 0 for weeks that do not have a result

It is referencing this other measure: DistCountResult = DISTINCTCOUNT(Table01[Result ID])

 

The graph is below:

MrAnderson72_0-1711643342231.png

 

When I connect the PBI Metrics to it, the scorecard result presents me the sum of all the points and not just the last value.

I do not want to change the original graph aspect, because people use it to consult the trend and how was the performance trhough time, also check the connected table with the detailed information, I just want to return the last value to PBI metrics as we have meetings to track the last week result.

 

The other PBI graphs that I connect they have this aspect when doing the connection:

MrAnderson72_1-1711643708751.png

This one does not show me as Latest Value but Current value:

MrAnderson72_2-1711643766790.png

 



How can I solve this issue ?

1 REPLY 1
v-huijiey-msft
Community Support
Community Support

Hi @MrAnderson72 ,

 

Consider creating a measure in Power BI that calculates values for the most recent week, and then use this measure in your scorecard.

LatestWeekValue =
VAR MaxWeek = MAX(Table01[Week of the year])
RETURN
CALCULATE([DistCountResultAdjusted], FILTER(ALL(Table01), Table01[Week of the year] = MaxWeek))

 

To learn more about creating and using metrics in Power BI scorecards, please see:

Create scorecards and manual metrics - Power BI | Microsoft Learn

 

If you have any further questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.