Forum Discussion
Use two different filters in a single mesure
Hello everyone,
I have a question regarding the creation of a new measure (which can be named A) by using an other measure (B) that has been already created. The measure B represents the whole marketshare of a product.
I also have two filters, one for the sellers and another for their zones. Each zone represents an area where the product is sold and it is made of several sellers.
A = B(filter seller chosen by the user) / B(filter zone of the seller chosen by the user)
or
A = the marketshare of the seller compared to his zone.
The request containing the market share data is different from the one containing the columns used for the filter. They are linked.
Do you know how it can be fixed ?
Thank you,
6 Replies
- MFelix
Super User
Hi Rem,
You information is very absctract however you have to make the measures to calculate over your filters something like this:
A = VAR Selected_Seller = MAX ( Table[Seller] ) VAR Selected_Zone = MAX ( Table[Zone] ) RETURN DIVIDE ( CALCULATE ( SUM ( Table[Column] ); Table[Seller] = Selected_Seller ); CALCULATE ( SUM ( Table[Column] ); Table[Zone] = Selected_Zone ) )Where I have SUM(Table[Column]) you can use your measure.
Not sure if this helps in anything but without data and expected result is hard to give you a more exact response.
Regards,
MFelix
- RemFrequent Visitor
Hi MFelix,
Thank you for the quick answer.
Measure B = products which have been sold in one year in France. = They are in a column in my table 2
Filter 1 : we can choose seller 1, seller 2.... = sellers present in a column in my table 1 = I put it in the visu as a filter
Filter 2 : zone 2, zone 2,... = a column too in table 1 too
Measure A = B filtered by the seller I have chosen / B filtered by the zone I have chosen
I can give you an example :
B = 100 000 products sold
Filter 1 = seller 1
Filter 2 = zone 3
A = 2000 (the products sold by the seller) / 10 000 (the products sold into the zone 3)