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