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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Bastaba
Frequent Visitor

RankX on axis X scatter chart - Visual

Hi,

I would like to get a variable X axis with RANKX.
I want to see the COUNT(ITEM) cumulated on X axis and Sell on Y axis.

I tried to use this measure :

Measure =
SELECTCOLUMNS(
    SUMMARIZE(
        ITEM_Table,
        ITEM_Table[Item],
        "Rank_S",
        RANKX(
            ALL(ITEM_Table)
            ,[Sell]
            ,,ASC,Skip
        )
    )
    ,"RETURN",[Rank_S]
)

But it doesnt work. Do you know if it's possible to do this ?
I can put ITEM_Table[Item] on X axis and order the measure Sell. But then the axis X is too large.
2 REPLIES 2
mohdasaad94
Helper I
Helper I

It is possible to use the RANKX function in a scatter chart in Power BI, but the measure you have provided is not quite suitable for that purpose.

To achieve the desired result, you could modify your measure in the following way:

Measure = VAR SummaryTable = SUMMARIZE( ITEM_Table, ITEM_Table[Item], "SellSum", SUM(ITEM_Table[Sell]) ) RETURN RANKX( SummaryTable, [SellSum], , ASC, Dense )

This measure creates a summary table that groups the items by their name and calculates the sum of their sales. Then it uses the RANKX function to assign a rank to each item based on their total sales, with the rank values being densely distributed.

To use this measure in a scatter chart, you can place it on the X-axis and the sum of the Sell column on the Y-axis. The scatter chart will then show the cumulative count of items on the X-axis and the total sales on the Y-axis.

Note that the RANKX function may return ties with the same rank value, which can cause issues with the scatter chart. To avoid this, you can use the DENSERANK function instead, as shown in the modified measure above.

Hello,

Thank you for your answer
I tried the solution but it is not working 
I get on X axis value 1 and the sell sum on Y
I would like to have all the ranks of Item on X axis like 
1 - 2 - 3 - 4 and on Y the value linked

Your DAX expression creates a value but it needs a column for the chart right ? 

 

Regards,

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors