Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi guys,
This question is based on a previous topic:
https://community.powerbi.com/t5/Desktop/Duration-of-usage-in-an-app/m-p/681482#M328233
I have been working with the calculated column that @TomMartens helped me with.
The problem is now, that I can not run the calculated column because of lack of memory (18 million rows).
I am wondering if there is any other way to create the "Duration" column?
This is the calculated column with slight changes from my previous post:
Tabel = ADDCOLUMNS( ADDCOLUMNS( SUMMARIZE( 'FullExtract2017-2025' ;'FullExtract2017-2025'[AppId] ;'FullExtract2017-2025'[SessId] ;'FullExtract2017-2025'[EventTime - Start] ;'FullExtract2017-2025'[Feature_Key] ;'FullExtract2017-2025'[Country_Key] ;'FullExtract2017-2025'[UserInfo_Key] ;'FullExtract2017-2025'[SessionNumber_Key] ;'FullExtract2017-2025'[Module_Key] ) ;"SessionEnd"; var thisAppID = [Appid] var thisSessID = [SessId] var thisSessionStart = 'FullExtract2017-2025'[EventTime - Start] var theEnd = CALCULATE( MIN('FullExtract2017-2025'[EventTime - Start]) ;ALL('FullExtract2017-2025'[Feature_Key]) ;FILTER( 'FullExtract2017-2025' ;'FullExtract2017-2025'[AppId] = thisAppID && 'FullExtract2017-2025'[SessId] = thisSessID && 'FullExtract2017-2025'[EventTime - Start] > thisSessionStart ) ) return IF(ISBLANK(theEnd); thisSessionStart; theEnd) ) ;"Duration";DATEDIFF('FullExtract2017-2025'[EventTime - Start];[SessionEnd];SECOND) )
I am querying the data from an SQL database.
Please tell me if you need additional information.
Thank you!
Solved! Go to Solution.
Hi @Anonymous
I've exerienced memory-problems with such a calculation as well. Using Power Query Group-function for "thisAppId" and "thisSessionId" could solve your case here:
https://www.thebiccountant.com/2018/09/30/memory-efficient-clustered-running-total-in-power-bi/
Please check if you can adapt it to your case, otherwise pls come back.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @Anonymous
I've exerienced memory-problems with such a calculation as well. Using Power Query Group-function for "thisAppId" and "thisSessionId" could solve your case here:
https://www.thebiccountant.com/2018/09/30/memory-efficient-clustered-running-total-in-power-bi/
Please check if you can adapt it to your case, otherwise pls come back.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
This looks very interesting!
I will have a look - thank you so much
User | Count |
---|---|
62 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
82 | |
62 | |
45 | |
41 | |
40 |