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.
Hello,
I want to create a measure that calculates avg session duration and attach "min" or "sec" word with it based on following condition
Solved! Go to Solution.
Avg. Session Duration = if(AVERAGE(driviology2[ga:avgSessionDuration])/60 >= 1 , AVERAGE(driviology2[ga:avgSessionDuration])/60 & " mins" ,SUM(driviology2[ga:avgSessionDuration]) & " secs")
@usmanrafiq , Refer
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Avg. Session Duration = if(AVERAGE(driviology2[ga:avgSessionDuration])/60 >= 1 , AVERAGE(driviology2[ga:avgSessionDuration])/60 & " mins" ,SUM(driviology2[ga:avgSessionDuration]) & " secs")
@usmanrafiq
I am not sure what your column driviology2[ga:avgSessionDuration] returns, is t seconds or Minutes ?
Wrap with FORMAT ([Measure],"General") & "Min"
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |