This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Hello,
I want to add a column(ID) in Power BI query editor same like I have added it in Excel using IF function. See picture below.
column(user_id) should be sorted out low to high.
Solved! Go to Solution.
@hello_MTC is it ok if it will be in dax? You basically need a ranking column there.
If yes, then you just want to write this calculated column:
CALC = RANKX('Table', 'Table'[user_id],,ASC,Dense)
I added a sample with differnet numbers:
Never mind! I solved it!
What if I want to put filter on column(user_type)?
Yes, I have user_type as Suspect, Witness Victim. And I want to filter this out by Victim only.
@hello_MTC can you maybe share a sample data so I could copy it to Power BI and send back the result?
how to share
@hello_MTC either you share a sample PBIX (through a link from onedrive/gdrive/dropbox/etc or just create a sample data in excel and copy paste the table to the message here.
Never mind! I solved it!
@hello_MTC Great! 🙂
Will appreciate your kudos on my messages :))
P.S. Check out my showcase report - got some high level stuff there. Sure you will find there a lot of cool ideas.
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up over there if you liked it 🙂
@hello_MTC is it ok if it will be in dax? You basically need a ranking column there.
If yes, then you just want to write this calculated column:
CALC = RANKX('Table', 'Table'[user_id],,ASC,Dense)
I added a sample with differnet numbers:
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 24 | |
| 24 | |
| 21 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 56 | |
| 52 | |
| 49 | |
| 26 | |
| 25 |