Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hello,
I have one table containing prices of several webshops for different products within different product categories. I would like to present the price difference between a selected webshop and the other webshops.
| Date | Webshop | Category | Product | Price |
| 01/01/2021 | A | Cat A | Product A | 10 |
| 01/02/2021 | A | Cat A | Product A | 10 |
| 01/01/2021 | A | Cat B | Product B | 15 |
| 01/01/2021 | B | Cat A | Product A | 9 |
| 01/01/2021 | B | Cat B | Product A | 9 |
| 01/01/2021 | B | Cat B | Product B | 12 |
| 01/01/2021 | C | Cat A | Cat | 6 |
My preferred output table looks like:
| Date | Product | Cat | Webshop A | Webshop B | Webshop C |
| 01/01/2021 | A | A | 0 | 1 | 4 |
| 01/01/2021 | B | A | 0 | 3 | - |
And changes depending on the filter on the webshop. Any suggestions how to solve this in DAX?
Thanks a lot for your help !
Michiel
Solved! Go to Solution.
@Michieldo , With an independent table for Webshop slicer
try a measure like
sum(Table[Price]) - sumx(filter(allselected(Table[Webshop]), Table[Webshop] = Selectedvalue(Webshop[Webshop])),[Price])
Hi @Michieldo ,
Could you please provide the related caculation logic of your preferred output? Why Webshop A is 0 , Webshop B is 1 and 3 for Product A and B separately and Webshop C is 4 for Product A base on your sample data?
Date Product Cat Webshop A Webshop B Webshop C 01/01/2021 A A 0 1 4 01/01/2021 B A 0 3 -
Best Regards
@Michieldo , With an independent table for Webshop slicer
try a measure like
sum(Table[Price]) - sumx(filter(allselected(Table[Webshop]), Table[Webshop] = Selectedvalue(Webshop[Webshop])),[Price])
Thanks, almost perfect! Allselected didn't work for me, but using Allexcept() in combination with the columns on which I did want to keep the filters on worked.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 49 | |
| 30 | |
| 25 | |
| 23 |
| User | Count |
|---|---|
| 131 | |
| 103 | |
| 58 | |
| 39 | |
| 31 |