Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello everyone,
I am trying to calculate the average of all services below 100%. Each month I have those services on the dashboard as shown below.
Is there a way to calculate the average and place it on a card.
Appreciate you help.
Hi @kasfour
you may try
Uptime =
AVERAGEX (
VALUES ( 'Date'[YearMonth] ),
CALCULATE (
VAR Uptime = 1-DIVIDE(SUM('Uptime YTD'[DOWNTIMEin minutes]),[DayDiff(Minutes)],0)
IF (
Uptime < 1,
Uptime
)
)
)
@kasfour
The MonthYear column is from which table. Replace 'Table'[Column] below with the real name of that column
Uptime =
AVERAGEX (
VALUES ( 'Table'[Column] ),
CALCULATE (
VAR Uptime =
1 - DIVIDE ( SUM ( 'Uptime YTD'[DOWNTIMEin minutes] ), [DayDiff(Minutes)], 0 )
RETURN
IF ( Uptime < 1, Uptime )
)
)
Thank you @tamerj1 . However the result is different than what I expected. The measure is called Avg. Uptime shown below. I expected the average to be taken from the services with lower than 100% only. In that example below the avg should have been (99.85+99.72+99.66)/3 = 99.74%
I guess the solution is close now :). Thank you so much for your help so far.
@kasfour
Sorry for the late response. I was stuck in a couple of meetings.
Please help me try understand the column chart visual. Previously I thought it is sliced by YearMonth which means each column (bar) is a actually a month. Having 3 columns means that there are minimum 3 months building up the filter context, however I can see that the date slicer is showing the dates of only one month (2023-Jan). Would you please clarify this point.
I measure the services uptime monthly using the below function
"Uptime = 1-DIVIDE(SUM('Uptime YTD'[DOWNTIMEin minutes]),[DayDiff(Minutes)],0)"
I measure the services uptime monthly using the below function
"Uptime = 1-DIVIDE(SUM('Uptime YTD'[DOWNTIMEin minutes]),[DayDiff(Minutes)],0)"
hi @kasfour
The average of what measure?
Or what measure do you have in your lower bar chart? How is it defined?
User | Count |
---|---|
16 | |
15 | |
14 | |
12 | |
11 |
User | Count |
---|---|
19 | |
15 | |
14 | |
11 | |
9 |