Forum Discussion
Calculating a percentage
I have a large dataset where I am trying to track my brokers performance, i have put a small example below.
I have a card visual to show the total number of records (10) & another card to show the number of RFT NO relating to the broker only (4)
How do I show the RFT NO relating to the broker as a percentage in a seperate card?
RFT | Root cause | 2nd level Route Cause |
YES | N/A | N/A |
YES | N/A | N/A |
YES | N/A | N/A |
YES | N/A | N/A |
NO | Broker Doc Error | Broker Container Error |
NO | Broker Error | Broker Error |
NO | Broker Error | Broker Cancelled |
NO | Broker Duplicate | Broker Script Error |
NO | Supplier Doc Error | Supplier Invoice Error |
NO | Supplier Error | Supplier Error |
Hi forster-sg ,
Please try the following formula:
Measure = DIVIDE ( CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[RFT] = "NO" && IF ( SEARCH ( "broker", 'Table'[Root cause], , -1 ) >= 1, TRUE ( ), FALSE ( ) ) ) ), COUNTROWS ( 'Table' ) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- amitchandak
Super User
forster-sg , Based on what I got, a measure like
divide(count(Table[RFT NO]), calculate(count(Table[RFT NO]), all(Table)))
- forster-sgFrequent Visitor
amitchandak
Should this formula show all RFT NO relating to the broker only? As that is what i need, i dont want to include the RFT NO of the supplier- v-kkf-msft
Community Support
Hi forster-sg ,
Please try the following formula:
Measure = DIVIDE ( CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[RFT] = "NO" && IF ( SEARCH ( "broker", 'Table'[Root cause], , -1 ) >= 1, TRUE ( ), FALSE ( ) ) ) ), COUNTROWS ( 'Table' ) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.