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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jeeo
Regular Visitor

Display Last Score in a Card

I'm struggling with the DAX to achieve what looks like a simple objective.  We're keeping a simple log of report values.  I'm wishing to display a Card Visual of the Score for the Last Report Date for each KPI type.2017-11-22_15-40-53.jpg  For example, I would like one card to display Revenue Growth 10%; the last known score for Revenue Growth, recorded on November 1st.  Whatever logic or DAX is involved, I can replicate for the other KPI's.  Thanks so much.

 

 

 

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

 

Try this measure.

 

=LOOKUPVALUE(Sheet1[Score],Sheet1[Report Date],MAX(Sheet1[Report Date]),Sheet1[KPI],VALUES(Sheet1[KPI]))

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ccakjcrx
Resolver I
Resolver I

Hey @Jeeo!

 

I was able to use the following measure, and attach it to a card visual to return the latest revenue number:

 

CALCULATE(
    SUM(Sheet1[Score]),
    FILTER(
        Sheet1,
        Sheet1[Report Date] = MAX(Sheet1[Report Date])
    ),
    FILTER(
        Sheet1,
        Sheet1[KPI] = "Revenue Growth"
    )
)

 Here is a screenshot of PBI Desktop:

 

CardLastDate.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Click HERE to access my .pbix file.

 

Hope this helps!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.