Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello everyone,
I'm trying to calculate the % of sales to a specific customer compared to the total sales.
This is what I have on my table: total sales, quantity, date, item code, customer id
Does anyone know an easier way to compare each item sales for that specific client x the total sales? I was wondering if I could create a measure that filers the client code already or if I should create another table filtering that specific client code (our biggest customer) and relate the two tables (specific client x total).
Thank you!!!
Solved! Go to Solution.
If I understand your purpose completely, you want two measures. One measure, which receives filters, and another measure, which doesn't receive filters. So I would make these measures:
Total sales = CALCULATE(SUM(Table[total sales]); ALL(Table[Customer Id]))
Sales = SUM(Table[total sales])
Sales / Total sales = [Sales] / [Total sales]
The Sales / Total sales-measure will be 1 if you do not filter on anything. If you, however, filter on a specific customer id, the Sales-measure will adjust, and the Sales / Total sales-measure will no longer be 1, but a fraction of 1.
Does this make sense? Let me know, if you want me to elaborate on anything and also whether it works or not.
Best
Martin
If I understand your purpose completely, you want two measures. One measure, which receives filters, and another measure, which doesn't receive filters. So I would make these measures:
Total sales = CALCULATE(SUM(Table[total sales]); ALL(Table[Customer Id]))
Sales = SUM(Table[total sales])
Sales / Total sales = [Sales] / [Total sales]
The Sales / Total sales-measure will be 1 if you do not filter on anything. If you, however, filter on a specific customer id, the Sales-measure will adjust, and the Sales / Total sales-measure will no longer be 1, but a fraction of 1.
Does this make sense? Let me know, if you want me to elaborate on anything and also whether it works or not.
Best
Martin
Thank you Martin! It worked perfectly!
I'm glad it worked out for you! Best of luck in the future.
Best
Martin
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
118 | |
84 | |
49 | |
38 | |
30 |
User | Count |
---|---|
188 | |
76 | |
73 | |
54 | |
45 |