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.
Hi,
I am trying to make a clustered bar chart in Power BI.
The situation is described as below :
I have a column "Value" which stores numeric value and I created another duplicate of this column (value duplicate). Same I have done for slicer and duplicated it.
The requirement is that in a clustered bar chart, I want one bar A should respond to slicer A and bar B to slicer B.
So that I can compare two bars (values, duplicate value ) one in "New" and other in "old" for same Place(axis) )
The output I am getting: -
If the value selected in both slicers is same then only I am getting value. If I select New in slicer A and Old in Slicer B then clustered bar chart becomes blank. (for obvious reasons as both slicers have interaction activated with clustered bar chart) (Interaction between the slicer is disabled)
I have tried making all possible calculated columns and measure.
And came to conclusions that it is not doable in power bi (might be I am wrong).
I have tried duplicating the data source as well and using one slicer from each data source, still didn't get the desired output.
Currently,
I can make two different horizontal graphs instead of creating one clustered bar chart.
Kindly help me or guide me in some direction.
Solved! Go to Solution.
Hi @Anonymous ,
Please check the following steps as below.
1. Create calculated tables as below.
D S = VALUES(Table1[Slicer Duplicate])
S A = VALUES(Table1[Slicer A])
2. Create relatioship between tables.
3. After that, we can create two measures to achieve our goal.
Measure = CALCULATE(SUM(Table1[value]),USERELATIONSHIP('S A'[Slicer A],Table1[Slicer A]))
Measure 2 = CALCULATE(SUM(Table1[value]),USERELATIONSHIP('D S'[Slicer Duplicate],Table1[Slicer Duplicate]))
Hi @Anonymous ,
Please check the following steps as below.
1. Create calculated tables as below.
D S = VALUES(Table1[Slicer Duplicate])
S A = VALUES(Table1[Slicer A])
2. Create relatioship between tables.
3. After that, we can create two measures to achieve our goal.
Measure = CALCULATE(SUM(Table1[value]),USERELATIONSHIP('S A'[Slicer A],Table1[Slicer A]))
Measure 2 = CALCULATE(SUM(Table1[value]),USERELATIONSHIP('D S'[Slicer Duplicate],Table1[Slicer Duplicate]))
Hi,
I tried the same solution but i'm facing circular dependency error while making a relationship with the tables created. I'm new to powerbi and need help
Thank You @v-frfei-msft for the swift and accurate solution.
Well, I learned something new today thanks to you.
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 |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |