Forum Discussion
Comparing two data sets
Hi Anonymous
Thank you so much for your response. I truly appreciate you taking the time to reply back with a solution. However, I tried doing it, but the many-to-one relationship is giving me an error for other filters. Is there any other way to do it?
Regards,
- Anonymous1 year agoNot applicable
Hi Surekha_PM,
Thank you for reaching out in Microsoft Community Forum.
Pleaase follow below steps to resolve the error;
1. Please Delete the Many-to-Many relationship between the Filter and BarGraph tables.
2. Use TREATAS to establish a virtual relationship between the tables in the measures themselves:
Dataset1_Value =
CALCULATE(
SUM('Filter'[Type]),
TREATAS(
VALUES('BarGraph'[ProductName]),
'Filter'[ProductName]
)
)Dataset2_Value =
CALCULATE(
SUM('BarGraph'[Type]),
TREATAS(
VALUES('Filter'[ProductName]),
'BarGraph'[ProductName]
)
)
3. use clustered bar chart with x-axis as product name and y-axis as Dataset1_Value and Dataset2_ValuePlease continue using Microsoft community forum.
If you found this post helpful, please consider marking it as "Accept as Solution" and give it a 'Kudos'. if it was helpful. help other members find it more easily.
Regards,
Pavan.