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.
Dear All
I have 2 tables which I want to create a stacked bar for comparision.
TABLE#1
Amount - Quarter
1K - Q1
2K - Q1
3K - Q2
TABLE#2
Amount - Quarter
1K - Q1
2K - Q1
2K - Q2
3K - Q3
4K - Q4
What I want basically is a smple bar char like the one below but unfortuanlly I encountered several issues
https://drive.google.com/file/d/1BiB0r-8XG1bg4OhQmu8epJNy_92T47lv/view?usp=sharing
first issue, I couldn't create a chart bar, I read online that I have to create a relationship between the tables so I did by inserting a new column as row ID in both tables.. I did that in the datasets itself (excel file) if there is better way please help me.
Then I was able to create a chart, but ONLY the first table has the correct sums in the Qs, the second one is WRONG.
If I select the table1 first then its sums are correct and table2 wrong, and if I select table2 first then its sums are correct and table2 is wrong
it's driving me crazy!
Solved! Go to Solution.
Hi @Clueless,
New a calculated table and create relationships based on common field [Quarter].
Quarter Table = FILTER ( DISTINCT ( UNION ( VALUES ( 'TABLE#1'[Quarter] ), VALUES ( 'TABLE#2'[Quarter] ) ) ), [Quarter] <> BLANK () )
Drag [Quarter] from 'Querter Table' onto X-axis. Drag [Amount] from two data tables.
Best regards,
Yuliana Gu
Hi @Clueless,
New a calculated table and create relationships based on common field [Quarter].
Quarter Table = FILTER ( DISTINCT ( UNION ( VALUES ( 'TABLE#1'[Quarter] ), VALUES ( 'TABLE#2'[Quarter] ) ) ), [Quarter] <> BLANK () )
Drag [Quarter] from 'Querter Table' onto X-axis. Drag [Amount] from two data tables.
Best regards,
Yuliana Gu
See my answer to a similar post - https://community.powerbi.com/t5/Desktop/Relationship-filtering-on-many-to-one-doesnt-filter/td-p/49...
Short verison you need to ensrue the filter context is either correctly impliied or force it yourself in your measure.
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 |
---|---|
109 | |
96 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
88 | |
63 |