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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
NewUser1989
New Member

How to Display Recent Value in Card Visual

Hi there!

 

I want to display using the card visual the recent value from my table (an excerpt from the original table), the recent % diff, which in this case is 0.29. And will remain so and will not be affected by the slicer until there is another value inputted under "Submitted" that will give another value for %diff. I can't seem to make this happen with lastdate and max function. Is there a DAX that will make this be possible?

 

Thanks and best regards.

 

DateSubmitted% from total% running totalCurrent % totalPrevious % total% diff
Oct 0760.44%47.8070%47.8147.370.44

Oct 08

   47.8147.810.00
Oct 09   47.8147.810.00
Oct 10   47.8147.810.00
Oct 11   47.8147.810.00
Oct 12   47.8147.810.00
Oct 1390.66%48.4649%48.4647.810.66
Oct 1440.29%48.7573%48.7648.460.29
1 ACCEPTED SOLUTION
Sahir_Maharaj
Super User
Super User

Hello @NewUser1989,

 

Can you please try this:

 

1. Find the most recent date with a 'Submitted' value

LastSubmittedDate = 
LASTNONBLANK(
    'YourTableName'[Date],
    'YourTableName'[Submitted]
)

2. Retrieve the '% diff' for the latest 'Submitted' date

Recent % Diff = 
VAR LastDate = [LastSubmittedDate]
RETURN
IF(
    ISBLANK(LastDate),
    BLANK(),
    CALCULATE(
        MAX('YourTableName'[% diff]),
        FILTER(
            'YourTableName',
            'YourTableName'[Date] = LastDate
        )
    )
)

Once you have the "Recent % Diff" measure, drag it into a card visual to display the most recent "% diff" value. Should you require my further assistance, please do not hesitate to reach out to me. 


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

View solution in original post

1 REPLY 1
Sahir_Maharaj
Super User
Super User

Hello @NewUser1989,

 

Can you please try this:

 

1. Find the most recent date with a 'Submitted' value

LastSubmittedDate = 
LASTNONBLANK(
    'YourTableName'[Date],
    'YourTableName'[Submitted]
)

2. Retrieve the '% diff' for the latest 'Submitted' date

Recent % Diff = 
VAR LastDate = [LastSubmittedDate]
RETURN
IF(
    ISBLANK(LastDate),
    BLANK(),
    CALCULATE(
        MAX('YourTableName'[% diff]),
        FILTER(
            'YourTableName',
            'YourTableName'[Date] = LastDate
        )
    )
)

Once you have the "Recent % Diff" measure, drag it into a card visual to display the most recent "% diff" value. Should you require my further assistance, please do not hesitate to reach out to me. 


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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