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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.