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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
MarieJ
Regular Visitor

how can I insert fixed integer in series?

rank integer.png

Hi, I am very new to Power BI, and have lots of questions.

Is it possible to insert fixed integer in series like {1..27} above red rectangle.

Either Quantity or Sales Amt would be sorted, the rank would be fixed.

 

I tried to make a new table with {1..27} and insert the column, but it looks like 27 same data of each line.

12 REPLIES 12
Vvelarde
Community Champion
Community Champion

 

You can create A Rank

 

This is for Quantity

 

Rank=Rankx(all(NameTable);Calculate(Sum(NameTable[Quantity]));;Asc)

 

This is for Sales Amount

 

Rank=Rankx(all(NameTable);Calculate(Sum(NameTable[Sales Amount]));;Asc)




Lima - Peru

thank you so much Vvelarde!!

but this is not what I wanted, what I want is not Rank for each column (Qty, Amt), but 1 column of 1 ~ 27 fixed integer, regardless of Qty rank or Amt rank.

In Excel, it's just simple, but I don't know how to do it i Power BI.

Sean
Community Champion
Community Champion

@MarieJ So lets assume that the column with the 27 items is Category

 

If you create a new Summary Table like this... where [Quantity] and [Sales Amount] are both Measures!

 

Summary Table =
SUMMARIZE (
    TableName,
    TableName[Category],
    "Total Quantity", [Quantity],
    "Total Sales", [Sales Amount]
)

You can then add this DAX Index Column that will basically rank the Category Column A-Z not the Measures!

 

DAX Index Column (Rank Category A-Z) = 
RANKX ( ALL('Summary Table'), 'Summary Table'[Category],,ASC )

The Index will not change unless you add new categories!

 

Hope this helps! Smiley Happy

MarieJ
Regular Visitor

Oh my God, Thank you so much Sean!

I will try to use this, but I'm not used to use DAX, it takes a while! ^_^

Vvelarde
Community Champion
Community Champion

@MarieJ

 

I'm not sure is that is what you want but :

 

Go to Edit Query-Add Column-Add Index Column




Lima - Peru

Dear Victor,

 

Thank you so much for your reply.

I tried add index, but it didn't work..

 

The reason why I want to have fixed integer is like below,

Rank is fixed, and Sales name, Quantity, Amount can be changed,

 so I can see who is No.1 for Quantiy, who is No.1 for Amount with one fixed column.

 

is this truely impossible? T.T

 

Capture.JPG

Hi MarieJ,

If you would like to add a fixed column with the sorting order, which would automatically sort the columns added in the same table visual, I am afraid this is not available.

Visuals in Power BI would gain the column data from the corresponding data table, if all the column shows the MAX value in the same visual, it would require the actual data table has the same structure in the visuals.

We could use the sorting (click on the top of each column, there would be a black triangle showing out, which woud automatically sorting the column) in the visuals to show the MAX value of each column, while this would have effect on the other columns.

 

For ranking with special column, please follow what Victor suggested.

If you have any further questions, please feel free to post back.

Regards

Thank you for your detailed explanation, Michael!

yeah, I can see now the visual i Power BI is quite different to excel.

maybe I have to find the other solution!

Vvelarde
Community Champion
Community Champion

@MarieJ

 

My last solution, is very simple but work in some scenarios

 

1. Create a Table  with 1 column from 1....27 values

 

Put in a table Visual

 

2. In A different Table Visual put the other columns., Try to look like a single table.

 

Demo.png




Lima - Peru

wow, it looks wonderful!!!

this is truely simple and good!!

Thank you sooooo much Victor!! ^__^

 

But if the list is over 43, I should scroll down rank table, and sale table seperately ^^;;;

and if the list is a lot, it's quite difficult to scroll down with same position T.T

Vvelarde
Community Champion
Community Champion

Do you want a fixed integer? or a Rank of a column?




Lima - Peru

oh! Thank you Vvelarde!

I want a fixed integer which is not changed by either Quanty rank or Sales Amt rank.

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.