Forum Discussion
Need help on DAX measures
- 1 year ago
Both solutions should work as expected. Using the sample PBIX file from Ritaf1983 and adding the formula I initially provided, it is evident that regardless of whether the resolution flag is "on-time" or "delayed," the result remains consistent for each month-year and experience center. The key difference between the approaches is that hers uses three measures, while mine relies on just one.
- 1 year ago
Can you please be more specific of what you really need? We've already provided you the formulas as well as screenshots of the report. Or do you want the same value for all months? If that is the case, please use this formula. Otherwise, please show us your expected result and not jus the data
Pct On-Time = // Calculate the total number of On-Time resolutions VAR _OnTime = CALCULATE ( SUM ( 'table'[count of number] ), FILTER ( ALL ( 'Table'[Resolution Flag], 'Table'[Month-Year] ), 'table'[resolution flag] = "On-Time" ) ) // Calculate the total number of Delayed resolutions VAR _Delayed = CALCULATE ( SUM ( 'table'[count of number] ), FILTER ( ALL ( 'Table'[Resolution Flag], 'Table'[Month-Year] ), 'table'[resolution flag] = "Delayed" ) ) RETURN // Calculate the percentage of On-Time resolutions DIVIDE ( _OnTime, _OnTime + _Delayed )
Both solutions should work as expected. Using the sample PBIX file from Ritaf1983 and adding the formula I initially provided, it is evident that regardless of whether the resolution flag is "on-time" or "delayed," the result remains consistent for each month-year and experience center. The key difference between the approaches is that hers uses three measures, while mine relies on just one.
HI Team,
Thanks for the reply, Please provide the exact DAX formula using below simple data,
Need to count the Number column.
Need to place the On time % value in all records.
Please provide teh exact formula
Thanks in advance
regards
M. Vijay Antony
- danextian1 year ago
Super User
Can you please be more specific of what you really need? We've already provided you the formulas as well as screenshots of the report. Or do you want the same value for all months? If that is the case, please use this formula. Otherwise, please show us your expected result and not jus the data
Pct On-Time = // Calculate the total number of On-Time resolutions VAR _OnTime = CALCULATE ( SUM ( 'table'[count of number] ), FILTER ( ALL ( 'Table'[Resolution Flag], 'Table'[Month-Year] ), 'table'[resolution flag] = "On-Time" ) ) // Calculate the total number of Delayed resolutions VAR _Delayed = CALCULATE ( SUM ( 'table'[count of number] ), FILTER ( ALL ( 'Table'[Resolution Flag], 'Table'[Month-Year] ), 'table'[resolution flag] = "Delayed" ) ) RETURN // Calculate the percentage of On-Time resolutions DIVIDE ( _OnTime, _OnTime + _Delayed )