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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
stino123
Helper II
Helper II

Creating a path exploration visual in Power BI like that that exists in GA4 (decision tree)

I am creating a dashboard for an app that we have created. in the events of this app we have specific users and users will navigate through the app how they see fit. What the stakeholders wish to see is how users navigate through the app. What is the second event they are likely to trigger? If they come in via a notification what is the next step related to the notificiation and the step beyond that. I created a custom column for the first following step and I could do so for the next step but that would make way too many calculated columns which would make my model super slow. Is there a best practice at approaching this. I have included the visual from GA4 as my ideal reference point. It looks allot like a decision tree but you cannot use a decision tree if the order is stored in one column?

 

stino123_0-1699967960626.png

 

 

Thanks,

 

1 ACCEPTED SOLUTION
stino123
Helper II
Helper II

The fix was creating a ranking based on a screen view event then creating 5 seperate calculated columns that identified the 1st, 2nd, 3rd... event as such. The second event needs to be inline with the non blank of the first event otherwise path exploration does not work. see below dax:

1st event = IF('4. Fact_events'[RankScreenViews]=1,'4. Fact_events'[screen_name],BLANK())
2nd event =
VAR FirstScreenViewValue = '4. Fact_events'[1st event]
VAR CurrentSessionID = '4. Fact_events'[session_id]
VAR SecondScreenViewValue =
    CALCULATE(
        MAX('4. Fact_events'[screen_name]),
        FILTER(
            '4. Fact_events',
            '4. Fact_events'[event_name] = "screen_view" &&
            '4. Fact_events'[RankScreenViews] = 2 &&
            '4. Fact_events'[session_id] = CurrentSessionID
        )
    )
RETURN
    IF(
        ISBLANK(FirstScreenViewValue),
        BLANK(),
        SecondScreenViewValue
    )
 

View solution in original post

7 REPLIES 7
stino123
Helper II
Helper II

The fix was creating a ranking based on a screen view event then creating 5 seperate calculated columns that identified the 1st, 2nd, 3rd... event as such. The second event needs to be inline with the non blank of the first event otherwise path exploration does not work. see below dax:

1st event = IF('4. Fact_events'[RankScreenViews]=1,'4. Fact_events'[screen_name],BLANK())
2nd event =
VAR FirstScreenViewValue = '4. Fact_events'[1st event]
VAR CurrentSessionID = '4. Fact_events'[session_id]
VAR SecondScreenViewValue =
    CALCULATE(
        MAX('4. Fact_events'[screen_name]),
        FILTER(
            '4. Fact_events',
            '4. Fact_events'[event_name] = "screen_view" &&
            '4. Fact_events'[RankScreenViews] = 2 &&
            '4. Fact_events'[session_id] = CurrentSessionID
        )
    )
RETURN
    IF(
        ISBLANK(FirstScreenViewValue),
        BLANK(),
        SecondScreenViewValue
    )
 

Hi there, sorry I'm still new at this - I have loaded my GA4 dataset to Power BI with the following dimensions - Date, Event Name, Country, and several metrics. How do I proceed with the first step (splitting Event Name into multiple sequential columns / ranking screen view) ? Thank you 🙂

lbendlin
Super User
Super User

Use a Decomposition Tree visual or a Sankey visual.

@lbendlin Decomposition tree won't work. you would need a column for first, second, third activity? same applies to a Sankey visual

No, Sankey works different. Only needs two columns.

@lbendlin This does not work because again you would need a measure for each next measure. Like the tree diagram it needs a new category each time...

Further, You can have a duplicate dimension in a sankey visual which would be needed if you need to see each event. 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors