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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
shahidalaila23
Frequent Visitor

showing latest date in Card visual

Hi All, 

 

I have created a measure to display data with the latest date. However, the measure only working with Table visual. If I put the measure in a card visual of KPI visual, I can't filter measure = 1 to show the latest data. 

 

Below is my measure, my table name is (MAIN DATA TABLE), Bizdate is the date column. 

 

Measure =
VAR LatestDate =
CALCULATE ( MAX ( 'MAIN DATA TABLE'[Bizdate] ), ALL ( 'MAIN DATA TABLE' ) )
RETURN
IF ( MIN ( 'MAIN DATA TABLE'[Bizdate] ) = LatestDate, 1, 0 )

 

suppose if I put the measure into filter and select =1, it will show the latest data but this did not work for card or KPI visual.

shahidalaila23_0-1627291343805.png

For card visual, I can't filter measure to = 1

 

Is there other way or measure I can use? 

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

Hi, @shahidalaila23 

 

Because there is no context in card and kpi visual, you can't get a specific date and compare it with the date you want to display. Just like the measure you wrote is used to filter rows, not to change the value. So you need to directly write the measure in the card and kpi that meets your needs.

 

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.


Best Regards,

Community Support Team _ Janey

View solution in original post

2 REPLIES 2
v-janeyg-msft
Community Support
Community Support

Hi, @shahidalaila23 

 

Because there is no context in card and kpi visual, you can't get a specific date and compare it with the date you want to display. Just like the measure you wrote is used to filter rows, not to change the value. So you need to directly write the measure in the card and kpi that meets your needs.

 

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.


Best Regards,

Community Support Team _ Janey

amitchandak
Super User
Super User

@shahidalaila23 , Create a measure like


Measure =
VAR LatestDate =
CALCULATE ( MAX ( 'MAIN DATA TABLE'[Bizdate] ), ALLSELECTED ( 'MAIN DATA TABLE' ) )
RETURN
calculate([measure] , filter('MAIN DATA TABLE', 'MAIN DATA TABLE'[Bizdate] = LatestDate))

 

and try. Use all in place of allselected if needed

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors