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.
Hello PowerBI community,
How do I calculate the uptime % per month with the data available below ? Can you please help me think through the DAX here?
What I have
S.No | Downtime Start Date | Downtime Minutes | Downtime End Date |
1 | 1/1/2022 | 50400 | 2/5/2022 |
2 | 1/2/2022 | 46080 | 2/3/2022 |
3 | 1/3/2022 | 102240 | 3/15/2022 |
4 | 1/4/2022 | 28800 | 1/24/2022 |
5 | 1/5/2022 | 79200 | 3/1/2022 |
6 | 1/6/2022 | 80640 | 3/3/2022 |
7 | 1/7/2022 | 110880 | 3/25/2022 |
8 | 1/8/2022 | 50400 | 2/12/2022 |
What I want to calculate -
S.No | Jan (uptime%) | Feb (Uptime%) | Mar (Uptime %) |
1 | 0 | 82 | 100 |
2 | 3 | 89 | 100 |
3 | 6 | 0 | 52 |
4 | 10 | 100 | 100 |
5 | 13 | 0 | 97 |
6 | 16 | 0 | 90 |
7 | 19 | 0 | 19 |
8 | 23 | 57 | 100 |
Thanks in advance!
@amitchandak @Greg_Deckler @Jihwan_Kim @lbendlin
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but please chech the below picture and the attached pbix file.
Uptime percentage measure: =
VAR _daysinamonth =
COUNTROWS ( 'Calendar' )
VAR _downstreamdaysinamonth =
COUNTROWS (
FILTER (
'Calendar',
'Calendar'[Date] >= MAX ( Data[Downtime Start Date] )
&& 'Calendar'[Date] <= MAX ( Data[Downtime End Date] )
)
)
VAR _upstreamratio =
DIVIDE ( _daysinamonth - _downstreamdaysinamonth, _daysinamonth )
RETURN
IF ( HASONEVALUE ( Data[S.No] ), _upstreamratio )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
I am not sure if I understood your question correctly, but please chech the below picture and the attached pbix file.
Uptime percentage measure: =
VAR _daysinamonth =
COUNTROWS ( 'Calendar' )
VAR _downstreamdaysinamonth =
COUNTROWS (
FILTER (
'Calendar',
'Calendar'[Date] >= MAX ( Data[Downtime Start Date] )
&& 'Calendar'[Date] <= MAX ( Data[Downtime End Date] )
)
)
VAR _upstreamratio =
DIVIDE ( _daysinamonth - _downstreamdaysinamonth, _daysinamonth )
RETURN
IF ( HASONEVALUE ( Data[S.No] ), _upstreamratio )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
42 | |
33 | |
30 | |
18 | |
18 |