Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I have a table with columns run id, claims, and treaty_name. i have 2 slicers which can choose one run id and another run id. i want to plot a bar chart with treaty_id as the x axis and the y axis having two bars one with claims from selected run id 1 and another with claims from selected run id 2.
is there a way to do this ?
basically my data LOOKS LIKE THIS and i want a bar chart with treaty_id in x axis with claims from run id 111 and run id 222 as bars in a bar chart. note i have many run ids so comparison can be between any two selected via slicers
run id | treaty_id | year | claims |
111 | ABC | 2023 | 10 |
111 | ABC | 2024 | 20 |
111 | ABC | 2025 | 30 |
111 | DEF | 2023 | 40 |
111 | DEF | 2024 | 50 |
111 | DEF | 2025 | 60 |
222 | ABC | 2023 | 70 |
222 | ABC | 2024 | 80 |
222 | ABC | 2025 | 90 |
222 | DEF | 2023 | 100 |
222 | DEF | 2024 | 110 |
222 | DEF | 2025 | 120 |
output:
Solved! Go to Solution.
I would go with one slicer with the run ids in it.
Have some text telling report consumers to select two run ids to compare.
Create a measure for filtering the visual.
Filter = IF(DISTINCTCOUNT(Table[runid]) = 2, 1, 0)
Put this filter in the filter pane against the chart and set it to "is 1"
The chart will only display if two run ids are selected.
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
I don't know what your actual model looks like but it works better if you have the run ids in a separate table.
See attached modified file.
Hopefully you can work a solution from that.
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
I don't know what your actual model looks like but it works better if you have the run ids in a separate table.
See attached modified file.
Hopefully you can work a solution from that.
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
Perfect this worked well.thanks for your solution.
@sanjayarun55 Here you go.
Here is the URL for the file: https://drive.google.com/file/d/1Yi6G5wFCI7QEu9b1uKQ-rgBksFEkcp0i/view?usp=sharing
** If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution, so that it comes in top of the search and help others. Thank you ! Good Luck 👍 |
I would go with one slicer with the run ids in it.
Have some text telling report consumers to select two run ids to compare.
Create a measure for filtering the visual.
Filter = IF(DISTINCTCOUNT(Table[runid]) = 2, 1, 0)
Put this filter in the filter pane against the chart and set it to "is 1"
The chart will only display if two run ids are selected.
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
thanks a lot implemented your idea and it worked
User | Count |
---|---|
73 | |
72 | |
39 | |
25 | |
23 |
User | Count |
---|---|
96 | |
93 | |
51 | |
43 | |
42 |