Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I am quite new to PBI. I am facing a dilemma. I have a table like below which has the data about pizza delivery guys delivery status. If they delivered on time then its a pass otherwise fail
What I want is to pivot the 'Name' column with the total jobs done by each person and a column with their fail % as below:
Name| Total Jobs | Pass | Fail | Fail%
--------------------------------------------
John | 2 | 1 | 1 | 50%
Mike | 3 | 0 | 3 | 100%
Many Thanks
N
Solved! Go to Solution.
Hi @Anonymous ,
You need 4 measures:
Total Jobs = COUNT('Table'[Name])fail = CALCULATE(COUNT('Table'[status])+0,ALLEXCEPT('Table','Table'[Name]),'Table'[status]="fail")Pass = CALCULATE(COUNT('Table'[status])+0,ALLEXCEPT('Table','Table'[Name]),'Table'[status]="pass")fail % = DIVIDE([fail],[fail]+[Pass])
Then put them with name in a table visual,you will see:
For the related .pbix file,pls click here.
Hi @Anonymous ,
You need 4 measures:
Total Jobs = COUNT('Table'[Name])fail = CALCULATE(COUNT('Table'[status])+0,ALLEXCEPT('Table','Table'[Name]),'Table'[status]="fail")Pass = CALCULATE(COUNT('Table'[status])+0,ALLEXCEPT('Table','Table'[Name]),'Table'[status]="pass")fail % = DIVIDE([fail],[fail]+[Pass])
Then put them with name in a table visual,you will see:
For the related .pbix file,pls click here.
Thank you! That worked..
Please can you explain the logic behind the below as I am new to DAX.
fail = CALCULATE(COUNT('Table'[status])+0,ALLEXCEPT('Table','Table'[Name]),'Table'[status]="fail")
Create measure like
Job count = calculate(count(Table[JobID]))
pass count = calculate(count(Table[JobID]),table[status]="pass")
fail count = calculate(count(Table[JobID]),table[status]="fail")
pass % = divide([pass count ],[Job count])
fail % =divide([fail count],[Job count ])
use with name in table, matrix or other visuals
Appreciate your Kudos.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 124 | |
| 107 | |
| 80 | |
| 69 | |
| 67 |