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 would love some help with a problem of mine.
I have this data with the account and the sum column. I would like to create a "category" column with the help of DAX.
New column "category" | Account | sum | ||
Stockholm | 30100 | 1100 | ||
Stockholm | 30106 | 45456 | ||
New York | 30110 | 122354 | ||
New York | 30112 | 565789 | ||
Stockholm | 30113 | 764866 | ||
Stockholm | 30120 | 1025033 | ||
Stockholm | 30121 | 1285199 | ||
Stockholm | 30122 | 1545366 | ||
Stockholm | 30123 | 1805532 | ||
Stockholm | 30124 | 2065699 | ||
Stockholm | 30190 | 2065699 | ||
Stockholm | 30199 | 565 | ||
Boston | 30300 | 2065699 | ||
Boston | 30310 | 1033132 | ||
Boston | 30399 | 826618,4 | ||
Los Angeles | 30400 | 620105,1 | ||
Los Angeles | 30410 | 413591,7 | ||
Los Angeles | 30499 | 207078,4 | ||
Florida | 30500 | 565 | ||
Florida | 30510 | -205948 | ||
Florida | 30520 | -412462 | ||
Florida | 30590 | -618975 | ||
Florida | 30599 | -825488 | ||
New orleans | 30800 | -1032002 | ||
New orleans | 30810 | -1238515 | ||
New orleans | 30820 | -1445028 | ||
New orleans | 30870 | 500 | ||
New orleans | 30899 | 456 | ||
San Diego | 31000 | 964127 | ||
San Diego | 31001 | 1686869 | ||
San Diego | 31010 | 2409611 | ||
San Diego | 31011 | 3132354 | ||
San Diego | 31020 | 3855096 |
So that I can use the category to create this
Solved! Go to Solution.
I'll show you two options. One is using the existing data to create groups, the other is using a calculated column with the ranges.
Thank you for the help. Normaly I'm sure it would have worked but sadly I only have accec to a very limited data set which prevents me from adding colums. The only thing I can do is to create meassures.
What would be the rules for the creation of this category?
I'm thinking something like this
Sum of "sum" column with accountnumber (30100-30106 and 30113-30199 )= Stockholm
Sum of "sum" column with accountnumber 30110-30112 = New York
Sum of "sum" column with accountnumber 30300-30399 = Boston
Sum of "sum" column with accountnumber 30400-30499 = Los Angeles
Sum of "sum" column with accountnumber 30500-30599 = Florida
Sum of "sum" column with accountnumber 30800-30899 = New Orleans
Sum of "sum" column with accountnumber 31000- 31020 = San Diego
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 |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |