Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi there,
I have a database that contains a list of users events in my App, basically where and when they click. The collumns I have are User ID, event type (as login, product selection, cart, payment options and confirmation) and time (in timestamp). I wanna know how many time users spend in each action using this data.
This can be done by creating a collumn that contains the time diference between two consectutive events of the same user (the first event can be ignored), but I coudn´t find a way to realize this. I have also tried to use the function EARLIER, but since my database is 20000 rows long, it keeps loading for minutes until I give up on it.
Can Power BI do this?
Hello @leonardosilva ,
Can you please share a sample data set along with the expected outcome?
Cheers!
Vivek
https://www.vivran.in/
Connect on LinkedIn
This is the desired outcome and an example I did with the EARLIER function:
When I applied this to the original database, it took 26 minutes to display a mensage saying I don´t have enough memory (I have 8GB) to make the process.
Hi @leonardosilva ,
Please try this one.
Column =
VAR t = 'Plan1'[timestamp]
VAR last =
CALCULATE (
MAX ( 'Plan1'[timestamp] ),
FILTER (
'Plan1',
'Plan1'[timestamp] < t
&& 'Plan1'[userid] = EARLIER ( 'Plan1'[userid] )
)
)
RETURN
t - last
Hi, @v-frfei-msft
I´ve tried this solution in my database but it also took 35 minutes and again displayed a mensage saying I don´t have enought memory. This is probably happening because my database is 20000+ rows long. Do you know another way to solve this using less memory?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 50 | |
| 44 | |
| 42 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 69 | |
| 32 | |
| 32 | |
| 32 |