Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I was wondering if anybody can help me with a formula. I have a set of salespeople who are responsible for different products. I created a formula which overwrites existing filter on salesperson, so I can see total sales for the product regardles of the salesperson. I have Total Sales= calculate(sum([sales amount], ALL(sales[salesperson], but then I want to use it in the table which will filter on the salesperson and only show Total Sales for products sold by filtered sales people. However, it lists everything now, because I used ALL as a overwrite for that filter. How can I keep filter in the formula calculation but when still apply it to a visual which use this calculation. Thank you!
Solved! Go to Solution.
Hi Lydia,
In your example, what I need as a result is to have $8,341,224,364.83 but only showing one Class Name - Economy. I think I found the solution to it by creating the additional measure which I use as a filter: IF(sum(Sales[SalesAmount])>0,1,0) and then I filter on 1. In this case I use ALL in the original measure instead of ALLSELECTED, and it seems to work.
Thank you for your help!
I make a test using my sample data, everything works well, you can review the following screenshots.
Could you please share dummy data of your table? I will test it in my environment.
Regards,
Lydia
Hi Lydia,
In your example, what I need as a result is to have $8,341,224,364.83 but only showing one Class Name - Economy. I think I found the solution to it by creating the additional measure which I use as a filter: IF(sum(Sales[SalesAmount])>0,1,0) and then I filter on 1. In this case I use ALL in the original measure instead of ALLSELECTED, and it seems to work.
Thank you for your help!
Hi @AKor
Try replacing ALL with ALLSELECTED
Total Sales = CALCULATE ( SUM ( [sales amount] ), ALLSELECTED ( sales[salesperson] ) )
I tried this option but it does not work, it still returns all products regardless if this sales person sells it or not.
To clarify a bit, I am trying to use slicers not filters, so ALLSELECTED does not work in this case.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
147 | |
109 | |
107 | |
85 | |
63 |