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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
HenryJS
Post Prodigy
Post Prodigy

Group Rows: New Column

Hi all,

 

How can I group rows of data

 

So 'Advert - Considering' and 'Advert - Not Progressing' are one new row called 'Advert Actions'. And the counts are added together

 

 

Capture1.JPG

 

 

 

UserNameActionRefActionNameActionDate
Katie Peachey3169223Advert - Considering17/04/2020 11:49
Katie Peachey3169183Advert - Considering17/04/2020 10:40
Sally Miller3146976Advert - Not Progressing31/03/2020 10:15
Sally Miller3146971Advert - Not Progressing31/03/2020 10:13
Sally Miller3145364Advert - Not Progressing31/03/2020 10:01
Sally Miller3144313Advert - Not Progressing31/03/2020 09:35
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @HenryJS,

Any similar strings in your records that used to create a new column as a group? If not, I'd like to suggest you try to create variables of values and used them to compare with current value to assign the group.

Sample:

Group =
VAR listA = { "A", "B", "C", "D" }
VAR listB = { "E", "G", "H" }
RETURN
    IF (
        [Column] IN listA,
        "GroupA",
        IF ( [Column] IN listB, "GroupB", "Ungrouped" )
    )

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @HenryJS,

Any similar strings in your records that used to create a new column as a group? If not, I'd like to suggest you try to create variables of values and used them to compare with current value to assign the group.

Sample:

Group =
VAR listA = { "A", "B", "C", "D" }
VAR listB = { "E", "G", "H" }
RETURN
    IF (
        [Column] IN listA,
        "GroupA",
        IF ( [Column] IN listB, "GroupB", "Ungrouped" )
    )

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@HenryJS,

Refer if this can help: https://radacad.com/grouping-and-binning-step-towards-better-data-visualization

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.