Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
HI,
I need help to create a sequence number as the photo shows, notice that I have the color duplicate, that is correct, every color belong to a different Style, I need a DAX code to built the sequence and used it later in a calculation
Thanks
Solved! Go to Solution.
Hi,
In the Query Editor, create an Index number column from 1. Thereafter, write this calculated column formula
=CALCULATE(DISTINCTCOUNT(Data[Attribute]),FILTER(Data,Data[Index]<=EARLIER(Data[Index])))
Hope this helps.
Hi,
In the Query Editor, create an Index number column from 1. Thereafter, write this calculated column formula
=CALCULATE(DISTINCTCOUNT(Data[Attribute]),FILTER(Data,Data[Index]<=EARLIER(Data[Index])))
Hope this helps.
Hey,
I'm not sure if I understand your requirement 100%, but maybe this is what you are looking for.
Create a calculated column using this DAX (not complete):
<nameofthecalculatedcolumn> = var thisAttribute = '<yourtablename>'[Attribute] return SWITCH( thisAttribute ,"FRISALES", 1 ,"MONSALES", 2 ,... )
Hopefully, this is what you are looking for.
If not please create a pbix that contains sample data that represents your table structure, upload the pbix to onedrive or dropbox and share the link.
Regards,
tom
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
77 | |
74 | |
57 | |
40 | |
33 |
User | Count |
---|---|
70 | |
63 | |
57 | |
49 | |
46 |