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
Jeremy19
Helper III
Helper III

How to create ID variable by value an other variable

Hello,

 

I would create ID variable like this exemple :

 

Variable A             ID

A                           1

A                           1

A                           1

B                           2

B                           2

C                           3

C                           3

C                           3

 

And I would like to create a formula for the variable to increment automatically when there is a new value in variable A. Can someone help me?

 

Thanks !

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

hI @Jeremy19

 

Try Ranking Column

 

ID =
RANKX ( Table1, Table1[Variable A],, ASC, DENSE )

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors