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
pboron
Frequent Visitor

Sorting chart by not showed column without changing tooltip

I have a chart showing value for different versions for certain products. Here's simplified version:

Chart with slicerChart with slicer

 

TableTable

I want to sort this chart by Date of Version (it should be 0.9.1 first, then 0.10.1 and then 0.11.1) and I can't use option 'Sort by column' for Version, because sometimes there are different products, which have versions named the same and I'm getting error, that I can't 'Sort by column', because there are different values in Date for same value in Version. I tried adding Date to tooltip and then sorting by Date in chart, but sometimes there are a lot of values and I want tooltip to show only values (it was showing date for each value, so if I had 3 values it would change to 9 lines on the tooltip and if I had more, it wouldn't even show every value, cause it then takes 3 lines for every value and Power BI for some reason limits tooltip to 11 lines). Are there any different ways to sort chart by column, which is not used in it?

 

Pbix file to download if needed.

6 REPLIES 6
pboron
Frequent Visitor

@v-diye-msft - Measure don't show up in 'Sort by column' in my Power BI. But even if it would, I don't think it would work, cause it would be the same problem, that there are some values in Version, that have different values in your measure. I saw in pbix file you attached, that you added your measure to chart tooltip and then sorted chart by it, but I can't do that, cause it clutter tooltip too much.

 

@mwegener - I checked pbix file you attached, but I'd like to avoid adding date to Version if possible, cause it again clutter chart too much, espacially that sometimes there are more than one version in a day, so it would have to be more than just year, month, day.

 

Isn't there a simple solution to just sort chart by column, that's not used in it, without changing anything?

Hi @pboron ,

 

I generated a sortable version number in Power Query.

 

You may download my PBIX file from here.
Hope this helps.

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


But that just sorts Version by name correctly (so that 0.10 is after 0.2, not before for example). I want to sort Version by date. There may be situations, where e.g. first there is version 0.0.1 made, then 0.1.1 and then 0.0.2 and I want to show it in this order, not 0.0.1, 0.0.2, 0.1.1

Hi @pboron 

 

Please add the measure below, and then sort the version by measure:

Measure = 
VAR t =
    SUMMARIZE (
        ALLSELECTED ( 'Table' ),
        'Table'[Date],
        'Table'[Version],'Table'[Value],'Table'[Result]
    )
RETURN
    COUNTROWS (
        FILTER (
            t,
            ISONORAFTER (
                    'Table'[Date], SELECTEDVALUE ( 'Table'[Date] ), DESC,
                    'Table'[Version], SELECTEDVALUE ( 'Table'[Version] ), DESC
            )
        )
    )

 005.PNG

Pbix attached.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Hi @pboron ,

can you add some kind of build number (date) to your version number?

So that it becomes unique and can be sorted according to it?

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hi @pboron ,

 

check this out.

PBIX

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


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.