Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I need help in makin g column chart including total
I have a Table 1:
Name | Type | Delivery |
A | External | On Time |
B | External | On Time |
C | Internal | Late |
D | External | On Time |
E | Internal | Late |
F | Internal | Late |
G | External | Late |
H | External | Late |
I | External | On Time |
J | Internal | On Time |
K | Internal | Late |
L | Internal | Late |
From the above Table 1, the on time delivery & their percentage on Total rows is
Type | On Time | % |
External | 4 | 33% |
Internal | 1 | 8% |
Total | 5 | 42% |
And the column chart as attached photo is what I need
Thanks in advance
Hi,
Try these measures:
On Time = CALCULATE(COUNTROWS(Data),Data[Delivery]="On time")
On Time (%) = [On Time]/CALCULATE(COUNTROWS(Data),ALL(Data))
Hope this help.
Hi @mahra-in,
Try this new table:
TBL =
VAR tbl_1 = SUMMARIZE(
Table1;
Table1[Type];
"Ontime";
CALCULATE(COUNT(Table1[Delivery]); FILTER(Table1; Table1[Delivery] = "On Time"));
"%";
CALCULATE(COUNT(Table1[Delivery]); FILTER(Table1; Table1[Delivery] = "On Time")) / CALCULATE(COUNT(Table1[Delivery]); ALL(Table1))
)
VAR tb_row = ROW("Type"; {"Total"} ; "OnTime"; SUMX(tbl_1; [Ontime]); "%"; SUMX(tbl_1; [%]))
VAR tb = UNION(tbl_1; tb_row)
RETURN tb
Ricardo
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |