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 everyone,
I'm trying to compare the price of different products that are on the same table with the possibility of being able to choose the products that I want to compare (Example: A vs B, A vs C, A vs D, etc). I have tried in two ways that u can see in my pbi file but the filters/selector aren't working properly. In example 1, when i choose the product that i would like to compare (filter 2) the name of the products dissappear in the main table. In example 2, when i choose the product in selector 2, the measure doesn't work because it should be price of product 1 - price of product 2 and it doesn't work when i use the selector 2. I'm attaching the files here (database and PBI File) : https://www.transferxl.com/00ZDwD8RZmtMX . Hope u can help me.
Thanks!
Solved! Go to Solution.
Hi @Migscruz,
You should also create a dimension table to store 'Product 2'.
And then create two measure as:
Product1 price =
CALCULATE(
MAX('Table'[ Average Price ]),
FILTER(
'Table',
'Table'[Name]=ALLSELECTED('Product 1'[Name])
)
)
Product2 price =
CALCULATE(
MAX('Table'[ Average Price ]),
FILTER(
'Table',
'Table'[Name]=ALLSELECTED('Product 2'[Name])
)
)
Here is the output:
Or you can try this:
Both of the output are contained in the attached demo, please try it.
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Hi @Migscruz,
You should also create a dimension table to store 'Product 2'.
And then create two measure as:
Product1 price =
CALCULATE(
MAX('Table'[ Average Price ]),
FILTER(
'Table',
'Table'[Name]=ALLSELECTED('Product 1'[Name])
)
)
Product2 price =
CALCULATE(
MAX('Table'[ Average Price ]),
FILTER(
'Table',
'Table'[Name]=ALLSELECTED('Product 2'[Name])
)
)
Here is the output:
Or you can try this:
Both of the output are contained in the attached demo, please try it.
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |