Forum Discussion
Published Power Bi Visual Column Chart randomly loses multiple X-Axis
Hi bdehning ,
As shown, have you tried sorting based on other columns:
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:
2.Select the year column and sort by the index column.
3.You can see the difference in the two pictures below, the first one is not sorted and the second one is sorted:
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.
- bdehning1 year agoPost Prodigy
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?
- bdehning1 year agoPost Prodigy
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)RETURNIF(ISBLANK([Count of Total Gross Incurred]), BLANK(), _Pre + _Mid + RANKX(ALLSELECTED(InjuryCause[Cause Grouping]),[Ref],,ASC,Skip))