Filter only one column based on the other with DAX

Shrikant

Active Member
Joined
Dec 28, 2010
Messages
284
Hi,

i have just started using DAX practically after going through various books & blogs
I have a scenario like this
I have sales of different products by different region.
I need to build a measure in which if I select a particular region lets say region 1 which sells only Product 1, 3, 5,
All the region should show sales of only product 1,3, & 5 in their respective regions.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
If you write a measure sum(table[qty]) and filter on a region, then it will only show sales for products sold in that region by default.
 
Upvote 0
Thanks Matt. But my problem is a little different.

Sorry i am unable to paste table here for more clarity
Let me explain

Suppose there are total 10 products which are sold in different regions.

For one analysis, I am benchmarking Region 1. (This benchmarking Region is fixed)
Region 1 sells only product 1,3,&5.
I need to have sales of only these 3 products in all other regions (like if Region 2 sales prodcut 1,3,5,&6 then 6 should be filtered out, similarly if region 3 sells only product 3,4,5 then measure should calculate only for product 3&5)

I have tried something like this in CALCULATE

CALCULATE(SUM(table[sales]),FILTER(DISTINCT(table[products]),table[regions]="region 1")))
but i guess filter does not work like that :(
 
Upvote 0
Please send me your email address via PM. I will send you a solution. I am planning a blog post about this next week as I think it is a good problem.
 
Upvote 0

Forum statistics

Threads
1,223,970
Messages
6,175,703
Members
452,667
Latest member
vanessavalentino83

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top