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

Calculate a drop out rate

 

 

Hi there

 

I would like to calculate the drop out rate by date and by page.

How can I achieve this please? Only by Date and Page so there should be only 2 dates for page 2 and 4 dates for page 1.

 

Thank you so much

 

 

DateID Page visitors

01/11/2006page 110
02/11/2006page 19
03/11/2006page 19
04/11/2006page 16
01/11/2006page 23
02/11/2006page 21
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

According to your description, you want to get the give up visitors' count and rate, right?

If it is a case, you can refer to below formula to achieve your requirement.

 

Base table:

Capture.PNG

 

Table formula:

 

Datail Info =
var summary=SUMMARIZE('drop visit id',[Page],"FirstDate",MINX(FILTER(ALL('drop visit id'),[Page]=EARLIER([Page])),[DateID]),"LastDate",MAXX(FILTER(ALL('drop visit id'),[Page]=EARLIER([Page])),[DateID]),
"MinVisitors",MINX(FILTER(ALL('drop visit id'),[Page]=EARLIER([Page])),[visitors]),"MaxVisitors",MAXX(FILTER(ALL('drop visit id'),[Page]=EARLIER([Page])),[visitors]))

var detail=ADDCOLUMNS(summary,"FirstVisitors",MAXX(FILTER(ALL('drop visit id'),'drop visit id'[DateID]=EARLIER([FirstDate])&&'drop visit id'[Page]=EARLIER([Page])),[visitors]),"LastVisitors",MAXX(FILTER(ALL('drop visit id'),'drop visit id'[DateID]=EARLIER([LastDate])&&'drop visit id'[Page]=EARLIER([Page])),[visitors]))

return

SELECTCOLUMNS(detail,"Page",[Page],"FirstDate",[FirstDate],"LastDate",[LastDate],"FirstVisitor",[FirstVisitors],"LastVisitors",[LastVisitors],"MaxVisitors",[MaxVisitors],"MinVisitors",[MinVisitors],
"GiveUp(ByDate)",if([FirstVisitors]-[LastVisitors]>0,[FirstVisitors]-[LastVisitors],0),
"GiveUpRage(ByDate)",if([FirstVisitors]-[LastVisitors]>0,FORMAT(([FirstVisitors]-[LastVisitors])/[FirstVisitors],"Percent"),"0%"),
"GiveUp(ByAmonut)",[MaxVisitors]-[MinVisitors],
"GiveUpRage(ByAmonut)",if([MaxVisitors]>0,FORMAT(([MaxVisitors]-[MinVisitors])/[MaxVisitors],"Percent"),"0%"))

 

 

Capture2.PNG

 

Regards

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

According to your description, you want to get the give up visitors' count and rate, right?

If it is a case, you can refer to below formula to achieve your requirement.

 

Base table:

Capture.PNG

 

Table formula:

 

Datail Info =
var summary=SUMMARIZE('drop visit id',[Page],"FirstDate",MINX(FILTER(ALL('drop visit id'),[Page]=EARLIER([Page])),[DateID]),"LastDate",MAXX(FILTER(ALL('drop visit id'),[Page]=EARLIER([Page])),[DateID]),
"MinVisitors",MINX(FILTER(ALL('drop visit id'),[Page]=EARLIER([Page])),[visitors]),"MaxVisitors",MAXX(FILTER(ALL('drop visit id'),[Page]=EARLIER([Page])),[visitors]))

var detail=ADDCOLUMNS(summary,"FirstVisitors",MAXX(FILTER(ALL('drop visit id'),'drop visit id'[DateID]=EARLIER([FirstDate])&&'drop visit id'[Page]=EARLIER([Page])),[visitors]),"LastVisitors",MAXX(FILTER(ALL('drop visit id'),'drop visit id'[DateID]=EARLIER([LastDate])&&'drop visit id'[Page]=EARLIER([Page])),[visitors]))

return

SELECTCOLUMNS(detail,"Page",[Page],"FirstDate",[FirstDate],"LastDate",[LastDate],"FirstVisitor",[FirstVisitors],"LastVisitors",[LastVisitors],"MaxVisitors",[MaxVisitors],"MinVisitors",[MinVisitors],
"GiveUp(ByDate)",if([FirstVisitors]-[LastVisitors]>0,[FirstVisitors]-[LastVisitors],0),
"GiveUpRage(ByDate)",if([FirstVisitors]-[LastVisitors]>0,FORMAT(([FirstVisitors]-[LastVisitors])/[FirstVisitors],"Percent"),"0%"),
"GiveUp(ByAmonut)",[MaxVisitors]-[MinVisitors],
"GiveUpRage(ByAmonut)",if([MaxVisitors]>0,FORMAT(([MaxVisitors]-[MinVisitors])/[MaxVisitors],"Percent"),"0%"))

 

 

Capture2.PNG

 

Regards

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Greg_Deckler
Super User
Super User

For that data, what would your expected results be?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I would like to see average drop out rate of page 1 over time, and page 2 and so on

thanks 🙂

Don'T you try to set up a measure e.g "DropOut Average" = average(drops) and then use the page no or the date as a lookup value in a matrix, bar chart or whatever?

Ho does the raw data / tables look like?
Anonymous
Not applicable

I want to see that the trend by over time as well as by page. Ultimately I would like to see which pages got highest drop out % etc... hope this makes sense?

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.