Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
8 | |
6 |