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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Card last date

Hello friends, 

 

I need to do a card (measure), which updates every day with the current date independent to have a date filter on report.

 

in short, I need to make a measure with the last date and that is not dependent on a filter in the report.

 

Can someone help me?

 

Thanks a lot!

1 ACCEPTED SOLUTION

@Anonymous Hence why I did not recommend having MAX in your CALCULATE and instead use a separate measure. You can also do this:

Total Defeito = 
VAR __Max = MAX(Log_Bateria[Data])
RETURN
calculate(
DISTINCTCOUNT(Log_Bateria[Equipamentos]),Log_Bateria[Status1] = "Com Defeito",
Log_Bateria[Data] = __Max) + 0


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

6 REPLIES 6
Greg_Deckler
Community Champion
Community Champion

@Anonymous You can use TODAY() or MAXX(ALL('Table'),[Date])



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hello, @Greg_Deckler 

 

I have this measure: 

Total Defeito = CALCULATE(
DISTINCTCOUNT(Log_Bateria[Equipamentos]),Log_Bateria[Status1] = "Com Defeito") + 0.
 
Where i include MAXX(ALL('Table'),[Date]) in this case?

@Anonymous Just create a new measure with that formula. Then you could adjust your formula to be something like:

Total Defeito = CALCULATE(
DISTINCTCOUNT(Log_Bateria[Equipamentos]),Log_Bateria[Status1] = "Com Defeito", 'Table'[Date]=[Max date measure]) + 0


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler 

 My data table is " Log_bateria[Data]"

 

I used : 

Total Defeito = calculate(
DISTINCTCOUNT(Log_Bateria[Equipamentos]),Log_Bateria[Status1] = "Com Defeito",
Log_Bateria[Data] = MAX(Log_Bateria[Data])) + 0
 
and return to me: A 'MAX' function was used in a True/False expression used as a table filter expression. This is not allowed.
 
Do you can help me?

@Anonymous Hence why I did not recommend having MAX in your CALCULATE and instead use a separate measure. You can also do this:

Total Defeito = 
VAR __Max = MAX(Log_Bateria[Data])
RETURN
calculate(
DISTINCTCOUNT(Log_Bateria[Equipamentos]),Log_Bateria[Status1] = "Com Defeito",
Log_Bateria[Data] = __Max) + 0


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hello, @Greg_Deckler 

 

It's work.

 

Thanks a lot !!! 

Helpful resources

Announcements
December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.