I want to show the data which is in the following format with the basic chart.
yAxis=1days, 2 hours and 46 minutes
xAxis=Apple
yAxis=2 days, 2 hours and 16 minutes
xAxis=Orange
I was thinking to convert each of the days, hours and minutes to seconds, then I could add the seconds to the data field, and it works. (E.g. there is x number of seconds in the 2 days, 2 hours and 16 minutes)
But I want the long-form "x days,x hours and x minutes" to be shown in the yAxis and in the tooltip as well.
I appreciate if you can give me any hints.
EDITED:
Example chart can be viewed from the following link. This is what I currently have.
http://jsfiddle.net/wqmrL3s4/
Question:
What exactly I want to do is to show yAxis and tooltip in the following format:
Related
Here is the sandbox link: https://codesandbox.io/s/chartjs-plugin-zoom-touch-scroll-y-forked-6q5li4?file=/src/components/ChartLine.vue
I am trying to build a chart out of some time-series data that I have.
I have a picker to select the scale: hour, day, week, and month, and the data can span up to 4 months. I start on the hour scale, but a visual problem I have is that I initially want the chart to focus on the last n hours/days/weeks instead of the current behavior where the chart shows the entire x-axis so the hour unit doesn't really make sense without tooltips.
How can I set limits using a UNIX timestamp of the min and max, and have the chart initially focus on the last n units? Like the last 4 hours or 4 days or 4 weeks or 4 months?
Firstly thank you for any help anyone can provide on this one.
I need to be able to
Calculate Percentiles for bed-days at the top-level grouped by months and quarters.
Be able to slice on other fields and have the percentiles recalculated.
To allow for a tabulated output akin to what is produced in a box plot.
(other summary metrics will be going alongside)
Sample Data
This should return a total of bed days to be fed into the percentile for 12 days on 01/04/2021 and 19 days for 02/04/2021 or 6 and 11 days if I sliced on cardiology.
Thanks again.
Joe
I have a Power BI heat map that measures the uptime of equipment for the current hour and each of the 8 hours prior:
The problem lies in the fact that a given hour may not always have records; in the above example, the machine was running from 4 AM to 6 AM non-stop and did not have any records for the 5 AM hour to indicate that it had been up and running that entire hour. The -3 hour should be showing 100% but it is incorrectly showing 0%.
This visualization has a separate measure for each hour, calculating the uptime for each hour. For example, Hour -3 has a calculation as follows:
-3 = IF(ISBLANK(CALCULATE(COUNTROWS(UptimeCombined), FILTER(UptimeCombined, UptimeCombined[Hours_Offset] = 3))) = TRUE,
(CALCULATE('UptimeCombined'[Uptime %], FILTER(UptimeCombined, UptimeCombined[Hours_Offset] > 3 && UptimeCombined[ShiftDateTime] = MAX(UptimeCombined[ShiftDateTime])))),
(CALCULATE('UptimeCombined'[Uptime %], FILTER('UptimeCombined', 'UptimeCombined'[Hours_Offset] = 3))))
If the row count comes back BLANK, then I need to look BACKWARD in time (max record where Hour_Offset > 3) and find the status (either "RN" or "DN") of whatever the last record was and display that uptime value for that hour (100% or 0%, respectively) but I can't get that part of the measure to work properly; the -3 hour should show 100% because the latest record before then had status of "RN" (in the -4 hour). Here is what the data looks like:
What is the correct DAX I need in Line 2 of this measure to set the uptime to either 100% or 0%, based on the latest record from before that hour?
I ended up filling in the data gaps in the source view on the SQL Server side before the data ever hits Power BI... much simpler that way than trying to mess with complex calculations and measures.
I have a report, updated on a daily basis, that provides me with a list of remote devices connected to our server.
A date column tells me the last date (and time) that a remote device sent data.
I want to conditionally format the column so that, if the last date is:
Today's date: the cell is green
Yesterday's date: the cell is yellow
Up to 30 days old: the cell is orange
older than 30 days: the cell is red
empty: the cell is empty
I've had a small degree of success in progressing towards my goal, but the colours are the wrong way round and I'm struggling with the "if" syntax. I can get today's date displaying yellow and every other date displaying green - but, to be honest, I've no idea quite how !!
Last data seen
This is what I've done so far...
I have created a measure "flag3" as below (with the intention of showing green for today, orange 1 day old and red for 2 days old)
flag3 = if(DATEDIFF(TODAY(),SELECTEDVALUE(DeviceStatus[Column1.lastDataRecordTime]),DAY),1,
(if(DATEDIFF(TODAY()-1,SELECTEDVALUE(DeviceStatus[Column1.lastDataRecordTime]),DAY),2,
(if(DATEDIFF(TODAY()-2,SELECTEDVALUE(DeviceStatus[Column1.lastDataRecordTime]),DAY),3)))))
And I have created conditional formatting based on background colour,
formatted by rules,
based on field flag3
If the value is 1 - then green
If it's 2 - then orange
If it's 3 - then red
Conditional Formatting based on Background Colour
As I've said previously- it's sort of working but the colours are the wrong way round and I'm struggling with syntax.
You can simply use a DATEDIFF formula - DATEDIFF(TODAY(),FIRSTDATE('Table_Name'[Date_Column),DAY) without an if function and use it in conditional formatting with following conditions:
greater than -10000 and less than -30
greater than -30 and less than
-1 euqal to -1
equal to 0
greater than 0 and less than 10000
Note: Make sure to replace Table_Name and Date_Column with your respective information
Example screenshot below:
I have issues with Data sorting
I have spend data by period which is a combination of year and month. For example if the period is March 2019 then period would show 201903. Data type of this period field is "Number". I have spend data starting from period 201501 to 201903.
Now I am creating a line chart to show spend trend with period in X axis and spend in Y axis. I have sorted (ascending) the chart by period, however sorting works ok partially, means period that I see in the chart are mentioned below:-
201708,201801,201806,201807,201808,201809,201810,201811,201812,201901,201902,201903
Not sure why sorting option is not working
Also in the Visual Level filter I want to show trailing 12 months spend, details of Visual Level filters that i selected are as follows:-
Visual Level Filter - Period
Filter Type - Top N
Show item - Bottom 12
By Value - Spend Amount
The expected result that I want in the line chart is :-
201804,201805,201806,201807,201808,201809,201810,201811,201812,201901,201902,201903
I checked the data and confirm it has all periods starting from 201501 to 201903
Any help would be highly appreciated