Forum Discussion
Plotting two values for one category in stack bar chart
- Anonymous9 years ago
Hi ANKITBISANI,
This issue is caused by that you use improper field (ID) to create relationships between the two tables. You can make a simple test in Query Editor, click your first table and select “Merge Queries” under Home ribbon to merge your second table, you will find that when you expand Think weights column from second table, the Think weights column has same values with Current weights column.
To achieve your requirement, create a new table using the following DAX.
amount range =
FILTER(
DISTINCT(
UNION(
DISTINCT('Current weights'[Current amount range ]),
DISTINCT('Think Weight'[Think amount range ])
)
),
NOT(ISBLANK('Current weights'[Current amount range ]))
)Then create relationship using amount range field among three tables as shown in the following screenshot.
At last, create stacked column chart using fields as shown in the screenshot below.Thanks,
Lydia Zhang
Hi ANKITBISANI,
This issue is caused by that you use improper field (ID) to create relationships between the two tables. You can make a simple test in Query Editor, click your first table and select “Merge Queries” under Home ribbon to merge your second table, you will find that when you expand Think weights column from second table, the Think weights column has same values with Current weights column.
To achieve your requirement, create a new table using the following DAX.
amount range =
FILTER(
DISTINCT(
UNION(
DISTINCT('Current weights'[Current amount range ]),
DISTINCT('Think Weight'[Think amount range ])
)
),
NOT(ISBLANK('Current weights'[Current amount range ]))
)
Then create relationship using amount range field among three tables as shown in the following screenshot.
At last, create stacked column chart using fields as shown in the screenshot below.
Thanks,
Lydia Zhang
Hello Anonymous
We implemented the solution but facing the problems when we connect to other dimention table.
Please refer to the below link . Post has been done with dimentional model.
https://community.powerbi.com/t5/Desktop/Can-t-create-direct-active-relationship/m-p/148425
Regards ,
Ankit