Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
pawelj795
Post Prodigy
Post Prodigy

Pie chart - filter Table


Hi,
I have Pie chart and table as below.
image.png

I want to filter my table by every piece of pie chart.
My problem is that pie chart contains only measures -> that cannot be change.

I think that bookmarks can be workaround, but I don't know exactly how(I create buttons provisionally)

Alternatively, maybe other visuals can be helpful?

21 REPLIES 21
Icey
Community Support
Community Support

Hi @pawelj795 ,

You can use the DAX expression below to convert several measures to one.

1. Enter a AgeRange table without any relationship among other tables.

agerange.PNG

2. Create a measure.

Measure =
SWITCH (
    TRUE (),
    SELECTEDVALUE ( 'AgeRange'[AgeRange] ) = "0-15", [0-15],
    SELECTEDVALUE ( 'AgeRange'[AgeRange] ) = "16-30", [16-30],
    SELECTEDVALUE ( 'AgeRange'[AgeRange] ) = "31-60", [31-60],
    SELECTEDVALUE ( 'AgeRange'[AgeRange] ) = "61-120", [61-120],
    SELECTEDVALUE ( 'AgeRange'[AgeRange] ) = "120+", [120+]
)

3. Put 'AgeRange'[AgeRange] on Legend and [Measure] on Values of chart.

 

Hope this could help you. If it doesn't work, please share me a dummy PBIX file without real data or sensitive information. And tell me your requirements.

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

rajulshah
Super User
Super User

Hello @pawelj795,

You can create a calculated column with the values of your Aging Buckets and create the measure accordingly.
If you can provide the sample data, I can help you in a better way.

@rajulshah 
It's a bit complicated, but I cannot create columns, it must be only measures.
I think bookmarks could be only solution, but I dont know how to creative create them, that they would fit with pie chart.
(every bookmark are different table with same column of index number and one measure of aging)


In meantime, I try to provide you some sample data.

@pawelj795 ,

 

What I understood from your scenario is that You want something like Drill down Pie chart? Means If you click on any bucket lets say 0-15 so corresponding data will get populated? Let me know if I sensed something wrong.

 

If Above said is your requirement so I suggest you to use Custom Visuals like "Advanced Donut Visual" from Market Place.

 

Please don't forget to hit THUMBS UP and Accept this as a solution if it helps you!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@Tahreem24 

Exactly 😉 You nailed it!

I will try your solution.

@Tahreem24 
Are there instruction/introduction to mentioned custom visual?
It seems very advanced on first sight.

@pawelj795 ,

 

Yeah you're going right. Use Advaned Donut Visual Light/Full which even you want. Try both the visuals and then decide which one is look good for your requirement.

 

Please don't forget to hit THUMBS UP and Accept this as a solution if it helps you!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@Tahreem24 
The first issue is below

image.png

The second issue are "values" in this visual.
I can only add one measure, but I need more, like in pie chart.

@pawelj795 ,

 

For your reference take a look at attached screen shot.

In the Category property, you can enter different drill down fields let's Year,Month, Day etc. and in Values property you can put one measure or numeric value.

Capture.JPG

 

Please don't forget to hit THUMBS UP and Accept this as a solution if it helps you!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@Icey 
@Tahreem24 

It's working exactly like your description 

 

Now, my question is, how to edit interactions in Advanced Donut Chart between visuals to work somehow like bookmark ?

I want to switching main table by clicking one piece of my pie chart.
For example, I click on 0-15 on pie chart, the table with index number shows only indexes with 0-15 aging etc.

It results with 5 almost same tables only differs for different measures.

@pawelj795 ,

 

You want something like below:

2.JPG1.JPG

 

Please don't forget to hit THUMBS UP and Accept this as a solution if it helps you!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@Tahreem24 

Exactly!
Maybe it's not important, but small adjustment that the same index cannot appear in two different Aging categories.

@pawelj795 ,

 

Simple follow my Post for unpivoting the all bucket columns then Take Table and Pie chart and it will automatically interacting with each other.

 

Capture.JPG

 

Please don't forget to hit THUMBS UP and Accept this as a solution if it helps you!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@Tahreem24 
Your solution with unpivoting columns are not gonna work.
You have every tape of aging group in columns, I have this calculation include in measure. 

That's why I think that I need bookmarks.
Only I want to know, if it possible to make every piece of pie chart (or any other visual) to be button to switch between tables.

@pawelj795  Give Thumbs up for Support And mark it as a solution.

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@Tahreem24 
That's my pie chart.
image.png
I need only measures in values, nothing more.
Problem is, that I cannot figure out how somehow change interactions between table and chart, because pie chart contains only measures.

@Tahreem24 

To sum up, I think that only solution are bookmarks.
But how to create them in approachable way?

@pawelj795 ,

 

Here you go.

Step 1: My sample data is look like below:

1.JPG

Step 2: Select your different bucket like I have selected in below screen shot. And then click on Unpivot Column.

2.JPG

Step 3: Then you'll get two column Attribute and Values.

3.JPG

Step 4: Then create a pie chart like below:

4.JPG

 

Finally, You'll get your expected output. Cause creating bookmark is tedious.

 

 Please don't forget to hit THUMBS UP and Accept this as a solution if it helps you!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@Tahreem24 
Unfortunately, your idea are not gonna work.
You see, for valid calculation of aging I have very complicated measures -> it's not possible to change this.

In your solution you are using columns.
That's the main problem.

@pawelj795 ,

 

You can unpivot your different bucket and create pie chart accordingly. GIve me some moments I am posting deets on it.

 

Please don't forget to hit THUMBS UP and Accept this as a solution if it helps you!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.