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.
Hi all,
In one of my tables I have a list of IT systems, and a column that lists, for each system, the amount of hours said system has been down or non-functional. I'm tryinng to calculate the proportion of a selected period of time that a given system was down for.
For example, if system X was down for 12 hours on the 3rd of March:
- There are 744 hours in March, so if I selected March in a slicer I would like to display that it was down for 1.612%
- There are 2160 hours in the first quarter of the year, so if i selected Q1, I'd like to display that it was down for 0.56%
- There are 8760 hours in a year, so if i selected a whole year I'd like to display that it was down for 0.14%
I am using a date table that has a column for hours, which has a value of 24 in every row. (I didn't allow for daylight savings etc as that level of accuracy wasn't necessary). When I display the amount of hours I use SUM(Hours).
My current formula is %Downtime = Downtime / SUM('Date'[Hours]). At the moment, I have 3 years worth in my date table and no matter what date range I select in the report, every %Downtime value is shown as "Downtime / 26,280".
What do I have to do to get this value to change based on the date range I select?
Thanks 🙂
Solved! Go to Solution.
From the image looks like you have created an calculated column, and i would recomend to change that to a measure.
Also, i have made a little test on my side and it should work like this:
Regards,
Sérgio Silva
Hi @Anonymous ,
Can you show us your model? Is the Calendar table connected to the table from were you get the downtime values?
Yes, the Date Table is directly related to the table that has the downtime values
From the image looks like you have created an calculated column, and i would recomend to change that to a measure.
Also, i have made a little test on my side and it should work like this:
Regards,
Sérgio Silva
How is that 'Day' column formatted in your model?
Also could you show me how you made your 'Downtime' measure?
Also, I think the fact that it looked like a calculated column was an error on my part. See here:
Never mind, I figured that part out. It works now, Thanks!
Glad i could help!
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 |
---|---|
105 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |