Determine what percentage of sales are bulk orders?
Category:
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: 9, Answers: 0)
Asked on May 29, 2020 2:16 pm
71 views
Answers (1)
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: 7)
Answered on May 29, 2020 2:54 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top