Forum Discussion
Return MAX value into column
- 2 years ago
Download PBIX file with the example below
This works for me
MAX Downtime Per Incident = VAR _MaxDT = CALCULATE(MAX('DataTable'[Downtime]), FILTER(ALL('DataTable'), SELECTEDVALUE('DataTable'[Issue ID]) = 'DataTable'[Parent ID])) RETURN IF(SELECTEDVALUE('DataTable'[Issue Type]) = "Incident", _MaxDT)In the table visual make sure that Issue ID is set to Show items with no data
Regards
Phil
Thanks for coming back to me Phil. Unfortunately I'm just getting blank in every row.
This is the updated query I used:
Can you please supply your actual data, or even better your PBIX file, so I can look at it and write the DAX to work with that.
Regards
Phil
- dwightman21762 years agoFrequent Visitor
Hi PhilipTreacy . How do I attach a PBIX file as I get an error saying I cannot attach that file type (same with Excel)
Thanks
David- PhilipTreacy2 years agoSuper User
Prob easiest to load the file to somewhere like OneDrive or Google Drive and then link to it from here.
Phil
- dwightman21762 years agoFrequent Visitor
Hi PhilipTreacy , hopefully Dropbox is OK?
I've attached a version of the data and PBIX file...hopefully it helps.
Basically we report uptime % in our weekly and monthly reports, which is all based on Sub-task data as that is where we record accurate downtime minutes for each incident.
For a quarterly report that we now produce, we have a to report uptime % based on the number of unique incidents, so I need to take the MAX downtime figure from the one or more sub-tasks that relate to each P1 or P2 incident, and use that in the uptime % calculation. That's why I wanted the MAX Downtime figure in the calculated colunn, so I could just replicate the same calculation we use for the weekly and monthly uptime %.
Thanks
David