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
Anonymous
Not applicable

2 Challenges with bar charts

Hi, I have a bar chart that can contain 3 "date buckets": <=1 Bus day, 2 days, >=3 Bus Days. They are linked to a table and act as a filter .
Two asks:

1. How do i sort them in the order that you see above? The legend details above are in one field

2. If the data set doesn't contain one or more of those values, they don't appear and of course the legend doesn't appear. Is there a way for me to force an entry into the legend if no records appear for any of the above, so it appears as 0 in the bar, and the description appears in the legend? Example of it missing, below:

SteveFromLI_0-1642542185812.png

I originally seperated out each as a column, and that worked great. It just didn't allow me to do drill down.
This is close to what the customer wants but they will also want the legend sorted with a descrption, and 0, if nothing appears.

1 ACCEPTED SOLUTION
KNP
Super User
Super User

A little difficult to give a definitive answer without actually seeing the data and data model but I put together a crude example. See attached.

The key to get the sorting to work is to have a sortable field to sort on and then choose the sort by option.

KNP_0-1642549458157.png

 

Having the buckets in a separate table to the data and choosing the 'Show items with no data' takes care of always showing the legend.

KNP_1-1642549572674.png

 

 

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 ;).
chrome-9xf-Zagzel-B

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.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thanks, this did the trick (almost)
My final challenge to this is that I'm trying to sort the data in a specific order, I set the column

 

SteveFromLI_0-1642688779231.png

I'd like to get it in the order as it appears in the field DatabucketSort, and i did choose to sort by that field (in the column menu) but it is ignoring that request.

The DateBuckets field on your chart came from which table?

It needs to come from the DateBuckets table, not your fact table.

 

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 ;).
chrome-9xf-Zagzel-B

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.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
Anonymous
Not applicable

Thank you very much. This could work for me.

KNP
Super User
Super User

A little difficult to give a definitive answer without actually seeing the data and data model but I put together a crude example. See attached.

The key to get the sorting to work is to have a sortable field to sort on and then choose the sort by option.

KNP_0-1642549458157.png

 

Having the buckets in a separate table to the data and choosing the 'Show items with no data' takes care of always showing the legend.

KNP_1-1642549572674.png

 

 

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 ;).
chrome-9xf-Zagzel-B

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.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

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.