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

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.

Reply
Anonymous
Not applicable

AVG worktime per month

Hello everyone. I am trying to calculate AVG workime of my people in salesforce. I have got information about every visit they did. I took the time of first visit from a day and the last one to count daily workhours and it worked. Then I tried to calculate AVG worktime per MONTH per PERSON form that measure and the formula gives me error saying that i can not convert many columns to scalar value. Could someone help me with that case?

 

 

 

 

2 REPLIES 2
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

Can we have a data sample and the DAX you used for the measure?

 

Best Regards,
Mariusz

Please feel free to connect with me.
Mariusz Repczynski


 

Anonymous
Not applicable

Mariusz,

to count daily workhours I used formula below and it works 

Daily Worktime = MIN(Visits[Time of first visit])-MAX(Visits[Time of last vist])
 
but it only works when I create a table chart when I add Visit date with days and later when I want to aggregate it to monthly worktime it doesn't count properly. 
 
The formula I tried to count montly worktime is below
 
Measure = GROUPBY(Visits;Visits[VisitUserName];Visits[Start visit DATE].[Day];"NewTableName";CALCULATE(MINX(CURRENTGROUP();[Time of visit start]) - MAXX(CURRENTGROUP();[Time of visit finished])))
 
Thank you so much for answering. It it is too less I will provide data sample tomorrow. 
 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.