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.
I have a simple bar chart in which we have categories listed against the sales. By selecting the value in the slicer for categories, we can get a measure of selected value of the slicer. However, when I click on a bar in the chart, all other bars get faded. Now, will it be possible to get the name of the category as a measure based on the category bar I clicked on the chart?
Thanks for any suggestions
Solved! Go to Solution.
Hi @kkanda ,
Would you like to have a measure that displays selected bar?
Below is example: there are three products, showing sales on bar chart. I created a measure which returns clicked Bar.
If i click on product A, measure returns "A", if i click on product C, measure returns "C".
Dax measure:
I would like to add addition to my previous post: as Power BI is interactive, if you click on one bar it automatically filters everything on that page related to selected bar (example, product A). So it might seem that this new field is not needed.
There are several ways to test formula from above.
You can insert text box and set title to specific field.
Steps below:
Step 2:
If you selected Based on field "Product", this text item will display correct product, but only if bar chart is selected. If bar char not selected, it will always display some value (first product). If you selected Based on field "Clicked" it will display value only if bar is selected.
Second test: display it as a list. If you select product A, list will automatically display only product A. But if you select nothing on bar chart, it will display all products.
Cheers,
Nemanja
Hi @kkanda ,
Would you like to have a measure that displays selected bar?
Below is example: there are three products, showing sales on bar chart. I created a measure which returns clicked Bar.
If i click on product A, measure returns "A", if i click on product C, measure returns "C".
Dax 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 |
---|---|
114 | |
100 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |