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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Creating a new group for data in coloums

Hi

 

I need some assitance for the below . 

 

I have a column called  "Page" and "Package "

 

Each row represnts the page the unique id visited package purchased

 

I need to create a new group for the data in the "page" column 

 

For example new group name "wifi"  and data from the "pages" column that should be in this group should be 

 

Group Name Wifi

Packages
Payment
Portal
Purchase
PurchaseSuccessView
EnterVoucherCodeView 

 

and at the same time after creating this , it should show the data from the package coloum 

 

How do i splitt this and create groups , as i have to create 5 groups in total


Group name:  ENTERTAINMENT
 Pages:
 media
Videos
Tv-series
Tv-series-details

Group name:  TRAVEL
Pages:
Destinations
TravelActivities
TravelActivitiesDeta
travelActivitiesDetails
TravelEatDrink
TravelEatDrinkDetailGroup

Group Name: OVERVIEW
Pages:
Terms
Status
Help
InfoGroup

Name:  ONBOARD
Pages:
onboard
Onboarddetails
shipActivities
shipEatDrink
shipEatDrinkDetailsGroup

Name: ALL
Pages:
All

 

 power bi 1.JPGpower bi 2.JPG

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi @Anonymous , 

 

I suggest you create another table for group page column:

Group =
VAR Wifi =
    CROSSJOIN (
        ROW ( "Group", "Wifi" ),
        {
            "Packages",
            "Payment",
            "Portal",
            "Purchase",
            "PurchaseSuccessView",
            "EnterVoucherCodeView"
        }
    )
VAR ENTERTAINMENT =
    CROSSJOIN (
        ROW ( "Group", "ENTERTAINMENT" ),
        { "media", "Videos", "Tv-series", "Tv-series-details" }
    )
VAR TRAVEL =
    CROSSJOIN (
        ROW ( "Group", "TRAVEL" ),
        {
            "Destinations",
            "TravelActivities",
            "TravelActivitiesDeta",
            "travelActivitiesDetails",
            "TravelEatDrink",
            "TravelEatDrinkDetailGroup"
        }
    )
VAR OVERVIEW =
    CROSSJOIN (
        ROW ( "Group", "OVERVIEW" ),
        {
            "Terms",
            "Status",
            "Help",
            "travelActivitiesDetails",
            "TravelEatDrink",
            "InfoGroup"
        }
    )
VAR ONBOARD =
    CROSSJOIN (
        ROW ( "Group", "ONBOARD" ),
        {
            "onboard",
            "Onboarddetails",
            "shipActivities",
            "shipEatDrink",
            "shipEatDrinkDetailsGroup"
        }
    )
VAR ALL =
    CROSSJOIN ( ROW ( "Group", "ALL" ), VALUES ( 'Table'[Page] ) )
RETURN
    UNION ( Wifi, ENTERTAINMENT, TRAVEL, OVERVIEW, ONBOARD, ALL )

 

Create a slicer for 'Group[Group ]'Then use the following formula in your measure  or you can create a relationship between group table and fact table  :

 

TREATAS(VALUES('Group'[Group]),'Table'[Page])

 

For more details , please refer to  https://www.kasperonbi.com/dynamically-switching-axis-on-visuals-with-power-bi/

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

View solution in original post

1 REPLY 1
v-deddai1-msft
Community Support
Community Support

Hi @Anonymous , 

 

I suggest you create another table for group page column:

Group =
VAR Wifi =
    CROSSJOIN (
        ROW ( "Group", "Wifi" ),
        {
            "Packages",
            "Payment",
            "Portal",
            "Purchase",
            "PurchaseSuccessView",
            "EnterVoucherCodeView"
        }
    )
VAR ENTERTAINMENT =
    CROSSJOIN (
        ROW ( "Group", "ENTERTAINMENT" ),
        { "media", "Videos", "Tv-series", "Tv-series-details" }
    )
VAR TRAVEL =
    CROSSJOIN (
        ROW ( "Group", "TRAVEL" ),
        {
            "Destinations",
            "TravelActivities",
            "TravelActivitiesDeta",
            "travelActivitiesDetails",
            "TravelEatDrink",
            "TravelEatDrinkDetailGroup"
        }
    )
VAR OVERVIEW =
    CROSSJOIN (
        ROW ( "Group", "OVERVIEW" ),
        {
            "Terms",
            "Status",
            "Help",
            "travelActivitiesDetails",
            "TravelEatDrink",
            "InfoGroup"
        }
    )
VAR ONBOARD =
    CROSSJOIN (
        ROW ( "Group", "ONBOARD" ),
        {
            "onboard",
            "Onboarddetails",
            "shipActivities",
            "shipEatDrink",
            "shipEatDrinkDetailsGroup"
        }
    )
VAR ALL =
    CROSSJOIN ( ROW ( "Group", "ALL" ), VALUES ( 'Table'[Page] ) )
RETURN
    UNION ( Wifi, ENTERTAINMENT, TRAVEL, OVERVIEW, ONBOARD, ALL )

 

Create a slicer for 'Group[Group ]'Then use the following formula in your measure  or you can create a relationship between group table and fact table  :

 

TREATAS(VALUES('Group'[Group]),'Table'[Page])

 

For more details , please refer to  https://www.kasperonbi.com/dynamically-switching-axis-on-visuals-with-power-bi/

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors