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

How to Grouping Some username (Categorize)

I have data in the table below.

 

User Name
ACTSUP003
ACTSUP004
ACTSUP004.1
ACTSUP004.2
JVSKACT001
JVSKACT002
JVSKACT003
JCSKACT004
JVSKCM001
JVSKCM002
JVSKCM003
JVSKCO001
JVSKCOE001
PJACTOF1402B
PJACTOF1503A
PJACTOF1602
PJACTOF1602A
PJACTOF1602B
PURMGR001
PURMGR001.1
PURMGR002
PUROFFLINE

Now, I want to group the username in the next column such as table below.

User NameCategory
ACTSUP003ACT
ACTSUP004ACT
ACTSUP004.1ACT
ACTSUP004.2ACT
JVSKACT001ACT
JVSKACT002ACT
JVSKACT003ACT
JCSKACT004ACT
JVSKCM001CM
JVSKCM002CM
JVSKCM003CM
JVSKCO001CO
JVSKCOE001OE
PJACTOF1402BACT
PJACTOF1503AACT
PJACTOF1602ACT
PJACTOF1602AACT
PJACTOF1602BACT
PURMGR001PUR
PURMGR001.1PUR
PURMGR002PUR
PUROFFLINEPUR

Who knows how DAX can I use? Please help me how to make category using the keywords from data.

 

 

Best regard.

5 REPLIES 5
BalaVenuGopal
Resolver I
Resolver I

@saranp780 on which basis are you making these categories for exampe 

 

1) ACTSUP003  First 3 Letters ACT Which is fine 

2) JVSKCM001 how did you get CM (No Clue)

3) PJACTOF1402B how did you get ACT (No Clue) 

.

.

.

 

IF you can give your logic so that we can use String functions to get the requierd out put you can add as custom column and we will use power query to get this done .

 

Please give me exact logic and exact data so that we can resolve this.!!!!!!!!!1

2) JVSKCM001 how did you get CM (No Clue) ---> CM is the keyword JVSKCM001

3) PJACTOF1402B how did you get ACT (No Clue) ---> ACT is the keyword PJACTOF1402B

Hi @saranp780

 

From this conversation i undetstood  is that you have mapping for username and keyword. In this case you can do the following.

1) Create table from model (static table) and create two columns (UserName and Key)

2)  Insert your UserName and Key into this table (Unique values)

3) Then join this table with your transactional table .(Join column UserName)

4) Create custom column [use related function to get key from the table you created] in the transactional table.

 

 

Then you will get Username and key in same table .

 

Hope this will get what you need please mark this as solution if you got the expected result.

 

Regards,

Venu Gopal.

 

v-shex-msft
Community Support
Community Support

HI @saranp780,

 

Based on your sample data, I haven't found any logic about how to choose specific characters as the category.
Can you please share more detail about this?

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

I've thought that I can put it together by using the keyword such as ACTSUP001 , ACTSUP002 I will put them in ACT group because they have "ACT" in their text. But I don't know DAX that I can use.

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.