Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all,
I want to calculate percentage of qty per PO Number (example below so by PO1 and PO2).
I want to use percentage to be dynamically calculated (but always by PO Number) if I am using Plant or Material in Rows for Matrix/Table/Charts.
Thanks in advance
Solved! Go to Solution.
Hi @mb0307
Try this measure:
Percentage by PO Number =
VAR _Qty =
MAX ( 'Table'[Qty] )
VAR _TotalQtyPO =
CALCULATE ( SUM ( 'Table'[Qty] ), ALLEXCEPT ( 'Table', 'Table'[PO Number] ) )
RETURN
_Qty / _TotalQtyPO
Output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Hi, @mb0307
You can try the following methods.
1. Create a new calculation column to calculate the percentage.
Percentage by PO Number =
[Qty]
/ CALCULATE (
SUM ( 'Table'[Qty] ),
FILTER ( 'Table', 'Table'[PO Number] = EARLIER ( 'Table'[PO Number] ) )
)
2. Change decimal format to percentage format.
3.The results in Matrix and Table Charts are shown in the figure.
If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?
Best Regards,
Charlotte Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Can you add what results you are expecting to see based on the information in your table above if you were to manually calculate the answer?
Are you looking for a 5th column to show these results?
Hi @mb0307
Try this measure:
Percentage by PO Number =
VAR _Qty =
MAX ( 'Table'[Qty] )
VAR _TotalQtyPO =
CALCULATE ( SUM ( 'Table'[Qty] ), ALLEXCEPT ( 'Table', 'Table'[PO Number] ) )
RETURN
_Qty / _TotalQtyPO
Output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
117 | |
101 | |
71 | |
61 |