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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Reshma_Doshi
Regular Visitor

Need help with Dax

I have data as shown in the Image - which time spent in seconds on an App on various days. 

All columns are defined below. 

 

Col F is derived using Col B and Col E is derived using Col C. Values are repeated on each row in my dataset as data pertains to one user per day. 

 

I need to create a measure using dax where I can display "Sum of total time spent on this app per user" in minutes.   

Which is 234.25 seconds (6.17 +33.75+194.33 from Col G) / 3 users (Based on Unique count in Col A) / 60 (To convert into minutes).  

 

Reshma_Doshi_1-1693824664639.png

Looking forward to guidance. 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Reshma_Doshi 

You can create a measure as follows

Measure = var a=SUMMARIZE(ALLSELECTED('Table'),[User id],[Month],[Distinct Date Count],[Sum of Duration in Secs],"Divide",DIVIDE([Sum of Duration in Secs],[Distinct Date Count])/CALCULATE(DISTINCTCOUNT('Table'[User id]),ALLSELECTED('Table')))
return SUMX(FILTER(a,[User id] in VALUES('Table'[User id])&&[Month] in VALUES('Table'[Month])),[Divide])/60

Output

vxinruzhumsft_0-1693880287924.png

 

Best Regards!

Yolo Zhu

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

2 REPLIES 2
Reshma_Doshi
Regular Visitor

This helped! Thanks a ton. 

Anonymous
Not applicable

Hi @Reshma_Doshi 

You can create a measure as follows

Measure = var a=SUMMARIZE(ALLSELECTED('Table'),[User id],[Month],[Distinct Date Count],[Sum of Duration in Secs],"Divide",DIVIDE([Sum of Duration in Secs],[Distinct Date Count])/CALCULATE(DISTINCTCOUNT('Table'[User id]),ALLSELECTED('Table')))
return SUMX(FILTER(a,[User id] in VALUES('Table'[User id])&&[Month] in VALUES('Table'[Month])),[Divide])/60

Output

vxinruzhumsft_0-1693880287924.png

 

Best Regards!

Yolo Zhu

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

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.