The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a table which has user name, application name, time(seconds) I want to create a table where if the cumulative duration >30 mins then it should shows me values for that application.
Eg:
MY Data
User Name | Application Name | time |
U1 | slack | 10 mins (600 secs) |
U2 | slack | 25 mins |
U3 | MS Office | 25 mins |
U6 | MS Office | 3 mins |
U4 | spotify | 15 mins |
U5 | Spotify | 35 mins |
When I apply my condition of duration > 30 mins , then the Output view should be
User Name | Applciation | time |
U1 | slack | 10 mins (600 secs) |
U2 | slack | 25 mins |
U4 | spotify | 15 mins |
U5 | Spotify | 35 mins |
U3 & U6 did not make the cut because total time for MS Office was only 25+3 mins which is less then my min of 30 mins in the filter or wherever I can apply that condition.
Right now I cant apply my condition of time > 30 mins in the filters because its checking for time at row level meaning by user & application and its only showing me U5 in the output which is > 30 mins.
I would prefer not creating a new calculated column as it increases my file size. What I shared here is only example. I have millions of rows of data. But if there is no other way around then I can do that.
I have created measures for time(seconds) to convert it into mins & hours so can use that as well.
Solved! Go to Solution.
Create a measure like the one below and use it as a visual filter in the filter panel on your Application Name column (for >30).
Total App Time = CALCULATE(SUM(Table[Time]), ALLSELECTED(Table[User]))
or
Total App Time = CALCULATE(SUM(Table[Time]), ALLEXCEPT(Table, Table[Application Name]))
Replace Table with your actual table name.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi @newpi ,
You could use this measure:
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
Create a measure like the one below and use it as a visual filter in the filter panel on your Application Name column (for >30).
Total App Time = CALCULATE(SUM(Table[Time]), ALLSELECTED(Table[User]))
or
Total App Time = CALCULATE(SUM(Table[Time]), ALLEXCEPT(Table, Table[Application Name]))
Replace Table with your actual table name.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
122 | |
89 | |
75 | |
55 | |
45 |
User | Count |
---|---|
134 | |
120 | |
76 | |
65 | |
64 |