Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |