Forum Discussion
New measure
- 8 years ago
Hi KellyLen,
Based on your table try to use this measure:
percentage = IF ( DISTINCTCOUNT ( 'Status'[Status] ) > 1 , 1 , IF ( DIVIDE ( CALCULATE ( SUM ( 'Status'[Amount in EUR] ), 'Status'[Status] = VALUES ( 'Status'[Status] ) ), CALCULATE ( SUM ( 'Status'[Amount in EUR] ), ALL ( 'Status'[Status],'Status'[NOK/OK] ) ) ) = BLANK (), 0 , DIVIDE ( CALCULATE ( SUM ( 'Status'[Amount in EUR] ), 'Status'[Status] = VALUES ( 'Status'[Status] ) ), CALCULATE ( SUM ( 'Status'[Amount in EUR] ), ALL ( 'Status'[Status],'Status'[NOK/OK] ) ) ) ) )Then format as % and you should get the result below (put it as table to be more visible).
If you need to take out only the Ok status and remove the NOK from the calculation
percentage = IF ( MAX ( 'Status'[NOK/OK] ) = "NOK", BLANK (), IF ( DISTINCTCOUNT ( 'Status'[Status] ) > 1, 1, IF ( DIVIDE ( CALCULATE ( SUM ( 'Status'[Amount in EUR] ), 'Status'[Status] = VALUES ( 'Status'[Status] ) ), CALCULATE ( SUM ( 'Status'[Amount in EUR] ), ALL ( 'Status'[Status] ) ) ) = BLANK (), 0, DIVIDE ( CALCULATE ( SUM ( 'Status'[Amount in EUR] ), 'Status'[Status] = VALUES ( 'Status'[Status] ) ), CALCULATE ( SUM ( 'Status'[Amount in EUR] ), ALL ( 'Status'[Status] ) ) ) ) ) )Total calculations can also be redone to not include NOK
Regards,
MFelix
Hi KellyLen,
what is the type of data you have in the 1st pass match?
You want to calculate the % based on the total value of that column?
Hi MFelix,
I have there values: Count of 1st pass match. Rows are Order origin. and columns are Date.
I would like to calculate % based on Matching success values. For example based on my previous screenshots I would like to calculate Fuel TBO % - 4/68 = 0,0588 .. and like this for each row.
- MFelix8 years ago
Super User
How do you get the information that it doesn't ave PO?
- KellyLen8 years ago
Helper III
I have in order origin four values No PO, PO, Crew hotel TBO and Fuel TBO. I would like to exclude the No PO values.
- KellyLen8 years ago
Helper III
Just filtering works as well. :) Thank you for helping me again. :)