Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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
User | Count |
---|---|
15 | |
13 | |
12 | |
10 | |
10 |
User | Count |
---|---|
19 | |
15 | |
14 | |
11 | |
10 |