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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Fathopes
Frequent Visitor

Multiply no of working days

Hi All, Lets say I have datasets as below for Lorry A and Lorry B. Each lorry have their own specific capacity. Based on the formula for utilization rate, how can I mutiply the no of days for the lorry. Example we can see for lorry B, we have two working days. This should be work when we filter by date based on days, week, month. Appreciate your help on this.

 

LorryCollection DateVolume (kg)Capacity (kg/day)Utilization Rate (Volume/(Capacity * No of Day))Utilization Rate % (Utilization Rate * 100)
A1/1/2022302000.15015.00
A1/1/2022402000.20020.00
B2/1/2022603000.10010.00
B3/1/2022703000.11711.67
B3/1/2022403000.0676.67

 

Thanks and Regards,

Fathopes.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Fathopes ,

 

Please check the formula.

_rate =
var _days = CALCULATE(DISTINCTCOUNT('Table'[Collection Date]),FILTER('Table','Table'[Lorry]=EARLIER('Table'[Lorry])))
return
'Table'[Volume (kg)]/('Table'[Capacity (kg/day)]*_days)
1.jpg
 
Best Regards,
Jay

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Fathopes ,

 

Please check the formula.

_rate =
var _days = CALCULATE(DISTINCTCOUNT('Table'[Collection Date]),FILTER('Table','Table'[Lorry]=EARLIER('Table'[Lorry])))
return
'Table'[Volume (kg)]/('Table'[Capacity (kg/day)]*_days)
1.jpg
 
Best Regards,
Jay
Anonymous
Not applicable

Hi @Fathopes 
Firstly I made a summary table like this 

Lorry_num_days = 
SUMMARIZECOLUMNS('Lorry Data'[Lorry],"Num_days",DISTINCTCOUNT('Lorry Data'[Collection Date]))

Aditya_Meshram_0-1647243597618.png
Then I made a calculated column in the original table like this

Util Rate Column =
DIVIDE(
'Lorry Data'[Volume (kg)],
'Lorry Data'[Capacity (kg/day)] * LOOKUPVALUE(Lorry_num_days[Num_days],Lorry_num_days[Lorry],'Lorry Data'[Lorry])
)

Aditya_Meshram_1-1647243663212.png

Now you can multiply this column by 100 to get the utilization rate %.

Regards,
Aditya

amitchandak
Super User
Super User

@Fathopes , The information you have provided is not making the problem clear to me. Can you please explain with an example.

 

refer if this can help

Traveling Across Workdays - What is next/previous Working day
https://community.powerbi.com/t5/Community-Blog/Travelling-Across-Workdays-Decoding-Date-and-Calenda...

 

Check for comments for new column


Appreciate your Kudos.


Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi, I add no of days row based on the collection date to make it clear. Basically I would like to calculate the utilization rate( in red font) in power bi. Please refer the formula below for utilization rate. So how can I get the no of days based on collection date and from that I can calculate the utilization rate. Hope this info is helpful. 

 

LorryCollection DateVolume (kg)Capacity (kg/day)No of dayUtilization Rate (Volume/(Capacity * No of Day))Utilization Rate % (Utilization Rate * 100)
A1/1/20223020010.15015.00
A1/1/20224020010.20020.00
B2/1/20226030020.10010.00
B3/1/20227030020.11711.67
B3/1/20224030020.0676.67

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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