Forum Discussion
Monthly uptime calculation
Hi
I have a powerbi table
| Link details | Downtime (Min) | Month |
| Link-1 | 1000 | Jun |
| Link-1 | 3230 | July |
I need to calculate monthly uptime of each link....Excel formula is 1-((Downtime in Min)/(No of days in month*24*60))
How can calculate in Powerbi ? Pls help
Hi, rjithesh
You can try the following methods. Create a new date table.
Table:
Date = CALENDAR(DATE(2022,1,1),DATE(2022,12,31))Column:
Month = FORMAT([Date],"mmmm")No of days in month = CALCULATE ( COUNT ( 'Date'[Date] ), FILTER ( 'Date', [Month] = EARLIER ( 'Table'[Month] ) ) )uptime = 1 - DIVIDE ( [Downtime (Min)], [No of days in month] * 24 * 30 )Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandak
Super User
rjithesh , Try a measure like
Divide(Sum(Table[Down Time in Min]) , Sumx(Summarize(Table, Table[Link], Table[Month Year], "_1", Day(eomonth(max(Table[Date]),0))) , [_1]))
- v-zhangti
Community Support
Hi, rjithesh
You can try the following methods. Create a new date table.
Table:
Date = CALENDAR(DATE(2022,1,1),DATE(2022,12,31))Column:
Month = FORMAT([Date],"mmmm")No of days in month = CALCULATE ( COUNT ( 'Date'[Date] ), FILTER ( 'Date', [Month] = EARLIER ( 'Table'[Month] ) ) )uptime = 1 - DIVIDE ( [Downtime (Min)], [No of days in month] * 24 * 30 )Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.