Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I have a card visual that returns the latest date when the latest accident based on a DAX expression that filters on one of 2 groups
Ie.
Solved! Go to Solution.
Hi @villa1980 ,
Please update the formula of measure [Max_Date_By_Cat] as below and check if it can return the expected result...
Max_Date_By_Cat =
VAR _tab =
SUMMARIZE (
FILTER ( Workplace_Incidents, Workplace_Incidents[Incident] = "Maj" ),
Workplace_Incidents[Platform],
Workplace_Incidents[Date of Incident]
)
RETURN
MAXX ( _tab, [Date of Incident] )
If the above ones can't help you figure out, please provide some raw data in your table 'Workplace_Incidents' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And it is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi v-yiruan-msft,
What can I say, that has worked so well thank-you so much, took a while to understand what is going on with the expression but makes sense now....I should look at using VAR in the future when looking at these kind of expressions.
Many Thanks Again
Alex
Hi @villa1980 ,
Please update the formula of measure [Max_Date_By_Cat] as below and check if it can return the expected result...
Max_Date_By_Cat =
VAR _tab =
SUMMARIZE (
FILTER ( Workplace_Incidents, Workplace_Incidents[Incident] = "Maj" ),
Workplace_Incidents[Platform],
Workplace_Incidents[Date of Incident]
)
RETURN
MAXX ( _tab, [Date of Incident] )
If the above ones can't help you figure out, please provide some raw data in your table 'Workplace_Incidents' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And it is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi v-yiruan-msft,
What can I say, that has worked so well thank-you so much, took a while to understand what is going on with the expression but makes sense now....I should look at using VAR in the future when looking at these kind of expressions.
Many Thanks Again
Alex
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |