Forum Discussion
trevorsherpr
3 years agoFrequent Visitor
How to Get Column Total
Hi,
I have tried to make sense of numerous existing questions relating to this subject but still cannot get my measure right.
I am attempting to work out "Market Share" in the following table.. Which would be calculated by dividing the "All Delivery Decisions", which is a measure, into the column total of "All Delivery Decision"
The "All Delivery Decisions" measure looks like this:
All Delivery Decsions = [Early Delivery]+[On Time Delivery]+[Late Delivery]
And an example of the "Early Delivery" measure is this:
Early Delivery =
CALCULATE(
COUNTA('PowerBI_DeliveryStatistics'[Delivery Decision]),
'PowerBI_DeliveryStatistics'[Delivery Decision] IN { "Early" }
)
I have managed to build a measure that gives me the total of the "Late Deliveries" but struggling to get the all the deliveries...
Can anyone offer some help please?
I have managed to build a measure that gives me the total of the "Late Deliveries" but struggling to get the all the deliveries...
Measure = SUMX(ALLSELECTED('PowerBI_DeliveryStatistics'), CALCULATE(COUNT(PowerBI_DeliveryStatistics[LeadTimeDays])))
phew!
Found it!Measure = CALCULATE([Early Delivery]+[On Time Delivery]+[Late Delivery],ALLSELECTED())
1 Reply
- trevorsherprFrequent Visitor
phew!
Found it!Measure = CALCULATE([Early Delivery]+[On Time Delivery]+[Late Delivery],ALLSELECTED())