Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
68 | |
64 | |
52 | |
39 | |
26 |
User | Count |
---|---|
80 | |
57 | |
45 | |
44 | |
35 |