The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hallo
I have a table like this
CUSTOMER | TYPE | SALES |
A | prio | 10 |
B | normal | 5 |
C | low | 4 |
D | prio | 3 |
And I would like 1. to get a Dax function giving me the total of the sales of all the priority customers 2. only for the priority customers getting the percentage of its sales over the total of the prio sales
See ideal result:
CUSTOMER | TYPE | SALES | TOT PRIO SALES | % on tot prio sales |
A | prio | 10 | 13 | 77% |
B | normal | 5 | 13 | |
C | low | 4 | 13 | |
D | prio | 3 | 13 | 23% |
Thanks!
Solved! Go to Solution.
Hi @SteT82
1st measure is to Create Priority Sales
Total Priorty Sales = CALCULATE(
SUM(test[SALES]), KEEPFILTERS(test[TYPE] = "prio"))
2nd measure is to create a Total Priorty Sales
Prio Sales = CALCULATE([Total Priorty Sales], ALL(test))
3rd Create % of Total
Tot Prio sales% =
DIVIDE([Total Priorty Sales], [Prio Sales])
Convert the 3rd to %
Thanks
Joe
Hi @SteT82
1st measure is to Create Priority Sales
Total Priorty Sales = CALCULATE(
SUM(test[SALES]), KEEPFILTERS(test[TYPE] = "prio"))
2nd measure is to create a Total Priorty Sales
Prio Sales = CALCULATE([Total Priorty Sales], ALL(test))
3rd Create % of Total
Tot Prio sales% =
DIVIDE([Total Priorty Sales], [Prio Sales])
Convert the 3rd to %
Thanks
Joe
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |