Determine what percentage of sales are bulk orders?

Question ID: 109569
0
0

I have some sales data that looks something like

Item Department Salesperson Quantity Cost per Item Total Cost
Soccer Balls sports zach 100 1 100
Computers tech jennifer 2 100 200
soap home/kitchen jack 200 2 400

Obviously not real data. But I want to have a measure for the percentage of sales where the quantity is over 50. How would I go about doing this? Let me know if you need more example data but I hope this quick and dirty table is enough to demonstrate what I need.

Marked as spam
Posted by (Questions: 4, Answers: 0)
Asked on May 29, 2020 2:16 pm
8 views
Answers
0
Private answer

I think what you're missing is the "CALCULATE" function. Calculate will perform a calculation with a certain filter context.

The syntax is CALCULATE(function,filter)

bulkorderpercent = CALCULATE(COUNT(quantity),quantity >50) / COUNT(quantity).

This measure will obey normal filter context otherwise, if you wanted a total regardless of filter context in visualizations you can use ALL in your filter context.

Marked as spam
Posted by (Questions: 0, Answers: 3)
Answered on May 29, 2020 2:54 pm