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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Counting Abandoned Flows

Hello All,

Thanks for looking in to my post. I am struggling to find a better solution for below problem. 

 

Data:

mud_idvisitor_idsession_idTime stampPage Name
sk484462552301220202010/22/19 10:29 AMHello1
sk484462552301220202010/22/19 10:30 AMProjects Page
sk484462552301220202010/22/19 10:32 AMClick on A Project - Project1
sk484462552301220202010/22/19 10:34 AMClick on "Connect an API (bottom right on Project)
sk484462552301220202010/22/19 10:36 AMAPI catalog page
sk484462552301220202010/22/19 10:38 AMSelect an API - API details page
sk484462552301220202010/22/19 10:40 AMConnect to Project button
sk484462552301220202010/22/19 10:42 AMSelect API environment
sk484462552301220202010/22/19 10:44 AMHit Connect
sk484462552301220202010/22/19 10:46 AMProjects Page
sk484462552301220202010/22/19 10:48 AMClick on A Project - Project1
sk484462552301220202010/22/19 10:50 AMClick on "Connect an API (bottom right on Project)
sk484462552301220202010/22/19 10:52 AMAPI catalog page
sk484462552301220202010/22/19 10:54 AMSelect an API - API details page
sk484462552301220202010/22/19 10:56 AMConnect to Project button
sk484462552301220202010/22/19 10:58 AMSelect API environment
sk484462552301220202010/22/19 10:58 AMHello2
sk484462552301220202010/22/19 11:00 AMProjects Page
sk484462552301220202010/22/19 11:02 AMClick on A Project - Project1
sk484462552301220202010/22/19 11:04 AMClick on "Connect an API (bottom right on Project)
sk484462552301220202010/22/19 11:06 AMAPI catalog page
sk484462552301220202110/22/19 11:08 AMSelect an API - API details page
sk484462552301220202110/22/19 11:10 AMConnect to Project button
sk484462552301220202010/22/19 11:12 AMProjects Page
sk484462552301220202010/22/19 11:14 AMClick on A Project - Project1
sk484462552301220202010/22/19 11:16 AMClick on "Connect an API (bottom right on Project)
sk484462552301220202010/22/19 11:18 AMAPI catalog page
sk484462552301220202010/22/19 11:20 AMSelect an API - API details page
sk484462552301220202010/22/19 11:22 AMConnect to Project button
sk484462552301220202010/22/19 11:24 AMSelect API environment
GK32145643214512342110/22/19 10:30 AMHep123
GK32145643214512342110/22/19 10:30 AMHep12312fdrg
GK32145643214512342110/22/19 10:31 AMProjects Page
GK32145643214512342110/22/19 10:33 AMClick on A Project - Project1
GK32145643214512342110/22/19 10:35 AMClick on "Connect an API (bottom right on Project)
GK32145643214512342110/22/19 10:37 AMAPI catalog page
GK32145643214512342110/22/19 10:39 AMSelect an API - API details page
GK32145643214512342110/22/19 10:41 AMConnect to Project button
GK32145643214512342110/22/19 10:43 AMSelect API environment
GK32145643214512342110/22/19 10:45 AMHit Connect
GK32145643214512342110/22/19 10:47 AMProjects Page
GK32145643214512342110/22/19 10:49 AMClick on A Project - Project1
GK32145643214512342110/22/19 10:51 AMClick on "Connect an API (bottom right on Project)
GK32145643214512342110/22/19 10:53 AMAPI catalog page
GK32145643214512342110/22/19 10:55 AMSelect an API - API details page
GK32145643214512342110/22/19 10:57 AMConnect to Project button
GK32145643214512342110/22/19 10:59 AMSelect API environment
BR12432367543298765410/22/19 10:31 AMProjects Page
BR12432367543298765410/22/19 10:33 AMClick on A Project - Project1
BR12432367543298765410/22/19 10:36 AMClick on "Connect an API (bottom right on Project)
BR12432367543298765410/22/19 10:38 AMAPI catalog page
BR12432367543298765410/22/19 10:40 AMSelect an API - API details page
BR12432367543298765410/22/19 10:43 AMConnect to Project button
BR12432367543298765410/22/19 10:45 AMSelect API environment
BR12432367543298765410/22/19 10:47 AMHit Connect
BR12432367543298765410/22/19 10:50 AMProjects Page
BR12432367543298765410/22/19 10:52 AMClick on A Project - Project1
BR12432367543298765410/22/19 10:54 AMClick on "Connect an API (bottom right on Project)
BR12432367543298765410/22/19 10:57 AMAPI catalog page
BR12432367543298765410/22/19 10:59 AMSelect an API - API details page
BR12432367543298765410/22/19 11:01 AMConnect to Project button
BR12432367543298765410/22/19 11:04 AMSelect API environment
BR12432367543298765410/22/19 11:06 AMProjects Page
BR12432367543298765410/22/19 11:08 AMClick on A Project - Project1
BR12432367543298765410/22/19 11:11 AMClick on "Connect an API (bottom right on Project)
BR12432367543298765410/22/19 11:13 AMAPI catalog page
BR12432367543298765410/22/19 11:15 AMSelect an API - API details page
BR12432367543298765410/22/19 11:18 AMProjects Page
BR12432367543298765410/22/19 11:20 AMClick on A Project - Project1
BR12432367543298765410/22/19 11:22 AMClick on "Connect an API (bottom right on Project)
BR12432367543298765410/22/19 11:25 AMAPI catalog page
BR12432367543298765410/22/19 11:27 AMSelect an API - API details page
BR12432367543298765410/22/19 11:29 AMConnect to Project button
BR12432367543298765410/22/19 11:32 AMSelect API environment

 

Please Note:

- From above data, there are 3 users who used a website parallelly between 10:30 to 11:30

 

Completed flow(Flows Starts at Row "Projects Page" and if use Hit button("Hit Connect") which means compleetd flow) :

Projects Page
Click on A Project - Project1
Click on "Connect an API (bottom right on Project)
API catalog page
Select an API - API details page
Connect to Project button
Select API environment
Hit Connect

 

Abandoned Flow(didnt hit final button(so no "Hit Connect"):

Projects Page
Click on A Project - Project1
Click on "Connect an API (bottom right on Project)
API catalog page
Select an API - API details page
Connect to Project button
Select API environment

 

No flow at all(There is event for "Select API Enviroment", which means no flow at all):

Projects Page
Click on A Project - Project1
Click on "Connect an API (bottom right on Project)
API catalog page
Select an API - API details page
Connect to Project button

 

I need to count Number of abandoned flows. 

 

Kindly request your help

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

Hi, @Anonymous 

 

Based on my research, you may try the following measures.

 

totalflowforuser = 
COUNTROWS(
    FILTER(
        ALL('Table'),
        'Table'[Page Name] = "Projects Page"&&
        'Table'[mud_id] = MAX('Table'[mud_id])
    )
)

completedflows = 
COUNTROWS(
    FILTER(
        ALL('Table'),
        'Table'[Page Name] = "Hit Connect"&&
        'Table'[mud_id] = MAX('Table'[mud_id])
    )
)

abandonedflows = 
COUNTROWS(
    FILTER(
        ALL('Table'),
        'Table'[Page Name] = "Select API environment"&&
        'Table'[mud_id] = MAX('Table'[mud_id])
    )
)-[completedflows]

notflow = 
[totalflowforuser]-[completedflows]-[abandonedflows]

 

 

Result:

c1.png

 

Best Regards

Allan

 

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

View solution in original post

4 REPLIES 4
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on my research, you may try the following measures.

 

totalflowforuser = 
COUNTROWS(
    FILTER(
        ALL('Table'),
        'Table'[Page Name] = "Projects Page"&&
        'Table'[mud_id] = MAX('Table'[mud_id])
    )
)

completedflows = 
COUNTROWS(
    FILTER(
        ALL('Table'),
        'Table'[Page Name] = "Hit Connect"&&
        'Table'[mud_id] = MAX('Table'[mud_id])
    )
)

abandonedflows = 
COUNTROWS(
    FILTER(
        ALL('Table'),
        'Table'[Page Name] = "Select API environment"&&
        'Table'[mud_id] = MAX('Table'[mud_id])
    )
)-[completedflows]

notflow = 
[totalflowforuser]-[completedflows]-[abandonedflows]

 

 

Result:

c1.png

 

Best Regards

Allan

 

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

Anonymous
Not applicable

Hi Allan,

Thank you. This dax solution is great. I even applied it my original data. 

Only doubt i have at this point is,

Is there a way to force flow of events and then say its an abandoned flow(At present we are considering only "Select API environment" , but is there a way if the order as below, then its a abandoned flow..

Projects Page
Click on A Project - Project1
Click on "Connect an API (bottom right on Project)
API catalog page
Select an API - API details page
Connect to Project button
Select API environment

Thanks,

Siva

stretcharm
Memorable Member
Memorable Member

I used the group all rows to next the Pages, then used Table functions to filed it the Page has been visited Table.RowCount(Table.FindText([Events], "Projects Page"))

 

Note this just looks for the page rather than first and last pages. If you need that then the code would be a bit trickier

 

Data

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("vZjfb9owEMf/FStPrdSqubMvP3jr+jCmahLaHlseUprRrGlcgbu/fw4kaxsNOGMHIaETxJ9zcl++d/juLlo/q0ypBCm6iAhlDGgDjNuXDSC+QryCXEA8wVxcf7efTcu61hDNL1wWy3i7eLbSv8uFWYtZsSxdGbhl3NTV4lnoRlyLDicu+8h5X2rAvI9udNO0zMImmH0TZw/aGP0iVtXyybRXdJnOXTMl20wtc1GYotZL8XrEQ8i2mJ9l/WGTl5v3x9IUVb0+Bqu6+vQ3b/S/Z/vwZu+/ceXhp222uyubP9VKNy9lY1xhXZGmlRHdBl0Jib/8VBZefhSfSn6EQeRHahT5URJWfpQFlF8P2xgfOi2GSextfJYR3Pgs80TGZzMdZ3wwxIQxviEWghqf5aF/vWFYmwD1huRU9YYsgNPABOMRnMZiMWy9UR10mq+3EkFRYq9Sm6hFoFQDLb4PSdPy1X7vsxbw1+Nq6UiAXcrlIyRXuHwk+emWnyjdI1s+JXdQLZuqgCNaPk6G06yi/89mfEDqLTuVB5cdwYlkRzKE7IjGkB2lQWVH+UHZffkBaCHSXpWkZCMb5FmakGKbFR/BNis+0rPJ8hPt67FsinJpsXyq5KiGj6Nwqum9ZmhWbADtnOb5CPYwz0d6zvL8RPt6JJ/i0iOZVPv/gNUj+bjDcx2ftfP0gY9gHz6wkeDZ4viJ9rU4PsWlxfGpmXdpcHiG418aHHrEWKVBClEaTMcoTX/eHOgHLQ+cSM7/Ag==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [mud_id = _t, visitor_id = _t, session_id = _t, #"Time stamp" = _t, #"Page Name" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"mud_id", type text}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"visitor_id", "session_id"}, {{"Events", each _, type table [mud_id=text, visitor_id=number, session_id=number, Time stamp=text, Page Name=text]}, {"Start Time stamp", each List.Min([Time stamp]), type text}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Abandoned Flow", each if Table.RowCount(Table.FindText([Events], "Hit Connect"))=0 then "Y" else "N"),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "No flow at all", each if Table.RowCount(Table.FindText([Events], "Select API environment"))=0 then "Y" else "N"),
    #"Added Custom2" = Table.AddColumn(#"Added Custom1", "Completed flow", each if Table.RowCount(Table.FindText([Events], "Projects Page"))<>0 and Table.RowCount(Table.FindText([Events], "Hit Connect"))<>0 then "Y" else "N")
in
    #"Added Custom2"

 

Data Summary

let
    Source = Data,
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {"visitor_id", "session_id", "Events", "Start Time stamp"}, "Attribute", "Value"),
    #"Filtered Rows" = Table.SelectRows(#"Unpivoted Columns", each ([Value] = "Y")),
    #"Grouped Rows" = Table.Group(#"Filtered Rows", {"Attribute"}, {{"Count", each Table.RowCount(_), type number}})
in
    #"Grouped Rows"

 

Anonymous
Not applicable

Thank you. this works great. But my original data is complex and editing at query level is became tough. Dax solution is preferred.

Thanks again for helping me.

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.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.