Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi team,
I've been practicing PowerBI, and am trying to replicate the function on the 'Compare' page of this dashboard where you're able to select any two countries to be shown on the same column chart using two separate slicers.
I can't seem to make it work on my own. I have three slicers which interact with a column chart (but not with each other) which has the Cost of Living index on the Y axis split by country (on the X axis). The moment I select three different countries on the three slicers, the column chart disappears, but this doesn't happen when I have the same country selected on the slicers, and the column chart shows only a single column for the country selected on both the slicers.
If its of any help, I have measures calculated that average the Cost of Living Index across countries (and for all other indexes) and use it for the Y axis on the column chart.
I can't seem to attach the pbix. and the .csv source file, so I've attached a screenshot of the dashboard page I'd like to accomplish this on below. I'd like the slicers labelled with 'Country' to interact with the charts. Any help is appreciated, thanks!
Solved! Go to Solution.
Hi @red_ltxj,
You should create a separate table with countries and a measure which takes countries from this new table. For example, a combination of CALCULATE and TREATAS will do - please check the attached file with the example.
Best Regards,
Alexander
Hi @red_ltxj,
The separate table is not connected with the main one, and the slicers that are based on the columns of the main table cannot affect the standalone table.
Should you want to achieve such a behaviour, you can either create a filtering measure and apply to the slicer based on the separate table (in the filter pane) or do a bit of modelling and create an additional table for each column that is supposed to affect the selection, connect each of them with the main table and standalone one.
Please check the attached files.
Best Regards,
Alexander
That worked, thank you so much for your effort on helping me out. 🙂
Hi @red_ltxj,
You should create a separate table with countries and a measure which takes countries from this new table. For example, a combination of CALCULATE and TREATAS will do - please check the attached file with the example.
Best Regards,
Alexander
Hi Barritown,
Thanks for the reply, and that worked. However, I've come across a problem. When I try to copy and paste the chart to create charts for different indexes (in this case Groceries Index), the charts come up as blank. In fact any chart that is added to the page will come up as blank. But, In the pbix. you attached, the charts copy and paste just fine.
Also, may I know how you created the 'countriesTbl' table and the 'Country' column in the example you sent? I did it by first creating a Field Parameter and then using the DISTINCT function you used to create the 'Country' column in that table, so I wanted to confirm if this was the correct way.
Thanks!
Hi Barritown,
Just following up, I've managed to figure out why the charts were not appearning (fixed it by editing the interactions of the slicers).
However, I noticed that the newly created and separate 'Country' tables aren't affected by slicers. May I know why this is? Thanks!
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
109 | |
100 | |
39 | |
31 |