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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
bdehning
Post Prodigy
Post Prodigy

Published Power Bi Visual Column Chart randomly loses multiple X-Axis

I have a dashboard with 9 clustered column charts and ocasionally one will lose its sorting and two level X-Axis?.     

 

Why does this happen?

6 REPLIES 6
Anonymous
Not applicable

Hi @bdehning ,

 

I want to make sure that this happens occasionally and that only one visual has this problem.

 

I ran a simple test based on your description, is my procedure the same as yours?

1.Use sample data in Power BI desktop:

vlinhuizhmsft_0-1726118335201.png

2.Create multiple clustered column charts:

vlinhuizhmsft_1-1726118425230.png

3.Set the sorting for each bar chart:

vlinhuizhmsft_2-1726118580069.png

4.Publish to Power BI Service, open the report and pin to a dashboard:

vlinhuizhmsft_3-1726118748696.png

vlinhuizhmsft_4-1726118798125.png

5.It worked in the end.

vlinhuizhmsft_5-1726118832814.png

 

You can try to troubleshoot if there is an error when setting up the bar chart, refreshing the visuals, and if you can specifically describe the steps to reproduce the problem you are having, providing a detailed description of these steps will help in diagnosing and resolving the issue more efficiently.

 

Best Regards,
Zhu
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

 

 

 

Start by using two Columns in X Axis like 

bdehning_0-1726152045038.png

I can provide more specifics later as I use a Filter for Top 3 of Count which is for Cause and Sort Measures to provide Top 3 of Tenure.   

I have set up Slicer Page so users can select what ever company that want and they can select from 1 to all years the company has been a customer.  

 

I can test many companies and all 9 visuals perform just perfect.  I can select others and if I use two years they may work, but if only select one year, 2 visuals may lose the sort.   See example below.  This is one year of data selected.  

 

bdehning_1-1726152563252.png

 

Here is two years of data

bdehning_2-1726152672342.png

Works as intended.  

 

Anonymous
Not applicable

Hi @bdehning  , 

As shown, have you tried sorting based on other columns:

vlinhuizhmsft_0-1726728944984.png

 

For the problem of sorting lost can create an index column, according to the actual situation, select a column according to the index column sorting, the following is a simple test:

 

1.Here is the simple data, here an index column is created, note that the index column must maintain a one-to-one relationship with the field that needs to be sorted, otherwise an error will be reported:

 vlinhuizhmsft_1-1726729402062.png

 

2.Select the year column and sort by the index column.

 vlinhuizhmsft_2-1726729554123.png

 

3.You can see the difference in the two pictures below, the first one is not sorted and the second one is sorted:

vlinhuizhmsft_4-1726729761859.png

vlinhuizhmsft_6-1726730710280.png

 

Link on sorting by columns can be found here:

Sort one column by another column in Power BI - Power BI | Microsoft Learn

 

You can adjust the sorting logic to suit your reality, and if the problem persists, providing a PBIX file that is removed the sensitive data will allow the problem to be localized and resolved more quickly!

You can upload the PBIX file to a cloud storage service such as OneDrive, Google Drive (set up public access), SharePoint, or a Github repository, and then share the URL of the file.

 

Best Regards,
Zhu
Community Support Team

 

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

So what your saying is that I could list all years choices which in this case would be <1 yr, 1 yr, 2 yrs, 3 yrs, 4 yrs, 5 yrs, 6-7 yrs, 8-9 yrs, 10-11 yrs, 12-14 yrs, 15-19 yrs, 20-25 yrs and 26+ yrs.   I would have 13 rows of possible. The index would have 1- 13 choices and I could still sort and get the TOP 3 I am looking for?   

 

I need to do some work to take my large PBIX file and remove all sensitive data, but yet leave enough sample data to provide and show my issue for troubleshooting and testing.   

My columns for each visual are in one main table with a couple from other connected tables.  How do create Index Column and assign my 13 choices for Years choices from 1-13?  so it applies to all rows of large table of data?

This is the Measure I have to sort by now to get by Top 3 and Top3?  I tried using a Sort Column with Index but I got more than 3 results?

 

Sort measure Count Location Address1 Cause Sum =
VAR _FreqByCity = CALCULATE([Count of Total Gross Incurred], FILTER(ALL(InjuryCause[Cause Grouping]), [Top 3 by frequency]<4))
VAR _LN = LEN(FORMAT(CALCULATE([Count of Total Gross Incurred], ALL('LossRun'[Reporting Location Address1])), "text"))
VAR _Pre = _FreqByCity *POWER(10, _LN*2)
VAR _Inc = CALCULATE(RANKX(ALLSELECTED(LossRun[Reporting Location Address1]), [Sum of Total Gross Incurred],,ASC,Dense), ALLSELECTED(InjuryCause[Cause Grouping]))
VAR _Mid = _Inc * POWER(10, _LN)
RETURN
IF(ISBLANK([Count of Total Gross Incurred]), BLANK(), _Pre + _Mid + RANKX(ALLSELECTED(InjuryCause[Cause Grouping]),[Ref],,ASC,Skip))

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.