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
Anonymous
Not applicable

incremental column in Power BI

Hi Folks, I need small help. How to add incremental column in power bi, my source is tabular model i need add one column to display 1 to 50.

Note: Without using Rank and without touching my model i need to display 1 To 50 number sort by paid amount.

incremental column.PNG

5 REPLIES 5
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

If you don't want to use Rank(), you can try this:

1. Sort the Paid Amount column by DESC in power query editor

sort desc.png

2. Create an index column start from 1:

index.png

3. Close and apply power query editor, put this index column into the table to get the number 1-50 which is sorted by Paid Amount column

table index.png

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi v-yingjl, Thanks for your reply this is really helpful when we have an source like SQL OR Exel or any other source but here my scenario is  my source is tabular model so i can't create index column inpower Bi desktop level, If you have any other ways to add an cremental columns please suggest me.

Hi @Anonymous ,

Now let's arrange it together. Since your data source is a tabular model so that you cannot create a calculate column using Rankx(). Also, you don't want to modify your model. Right?

If so, whether I can create a measure intersperseding rankx() in it like this with the tabular model in power bi desktop to meet your requirement:

Measure =
VAR tab =
    SUMMARIZE (
        Sheet1,
        Sheet1[Provider Legacy Number],
        Sheet1[Paid Amount],
        "Rank", RANKX ( ALL ( Sheet1 ), Sheet1[Paid Amount] )
    )
RETURN
    SUMX ( tab, [Rank] )

tabular table.png

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Hi still am getiing issue becacuse Sheet1[Paid Amount],  this is calucalted measure in model  while writing  measure am not able to get paidamount . In my report all columns are coming from different table.

parry2k
Super User
Super User

@Anonymous you can use rank function, see here

 

https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.