Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Emmeli
Frequent Visitor

Create categorys with DAX

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

Emmeli_1-1706880324491.png

 

 

1 ACCEPTED 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.


lbendlin_0-1707152527017.png

 


 

 

View solution in original post

4 REPLIES 4
Emmeli
Frequent Visitor

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.

lbendlin
Super User
Super User

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

 

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.


lbendlin_0-1707152527017.png

 


 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.