Forum Discussion
Assistance required with formulating Measures
- 8 years ago
Hi Lance_CM,
Try DAX formula like this and check if they can meet your requirement:
_Scheduled Maint Delay (hrs) = IF ((MAX('G1-Axz'[Responsibility]) = "Electrical" || MAX('G1-Axz'[Responsibility]) = "Mechanical") && MAX('G1-Axz'[Scheduled]) = "Y", MAX('G1-Axz'[Total Down Time (hrs)])) _Unscheduled Maint Delay (hrs) = IF ((MAX('G1-Axz'[Responsibility]) = "Electrical" || MAX('G1-Axz'[Responsibility]) = "Mechanical") && MAX('G1-Axz'[Scheduled]) = "N", MAX('G1-Axz'[Total Down Time (hrs)])) _Scheduled Ops Delay (hrs) = IF (MAX('G1-Axz'[Responsibility]) = "Operational" && MAX('G1-Axz'[Scheduled]) = "Y", MAX('G1-Axz'[Total Down Time (hrs)])) _Unscheduled Ops Delay (hrs) = IF (MAX('G1-Axz'[Responsibility]) = "Operational" && MAX('G1-Axz'[Scheduled]) = "N", MAX('G1-Axz'[Total Down Time (hrs)]))In addtion, you can use visual level filter to filter Top5 values in any of your column with using any parameter, please refer to:
Best Regards,
Jimmy Tao
Hi Lance_CM,
Try DAX formula like this and check if they can meet your requirement:
_Scheduled Maint Delay (hrs) = IF ((MAX('G1-Axz'[Responsibility]) = "Electrical" || MAX('G1-Axz'[Responsibility]) = "Mechanical") && MAX('G1-Axz'[Scheduled]) = "Y", MAX('G1-Axz'[Total Down Time (hrs)]))
_Unscheduled Maint Delay (hrs) = IF ((MAX('G1-Axz'[Responsibility]) = "Electrical" || MAX('G1-Axz'[Responsibility]) = "Mechanical") && MAX('G1-Axz'[Scheduled]) = "N", MAX('G1-Axz'[Total Down Time (hrs)]))
_Scheduled Ops Delay (hrs) = IF (MAX('G1-Axz'[Responsibility]) = "Operational" && MAX('G1-Axz'[Scheduled]) = "Y", MAX('G1-Axz'[Total Down Time (hrs)]))
_Unscheduled Ops Delay (hrs) = IF (MAX('G1-Axz'[Responsibility]) = "Operational" && MAX('G1-Axz'[Scheduled]) = "N", MAX('G1-Axz'[Total Down Time (hrs)]))
In addtion, you can use visual level filter to filter Top5 values in any of your column with using any parameter, please refer to:
Best Regards,
Jimmy Tao
Hi Jimmy,
Appreciate the support mate!
I had a go at introducing the proposed DAX formula without any luck, I get “blank” results for all four measures.
To get the formula logic sorted, can I ask that we please only focus on the following:
- Only Harvest Week 201710,
- Responsibility - Mechanical and Electrical
- Scheduled - N
- Total Down Time (hrs)
I analysed the raw data outside power bi and determined the following:
- Total unscheduled Maint Delay should be = 25.13 hrs
Any additional corrective actions you can suggest will be welcome?
Cheers,
Lance