Specifically the Interval Properties.
No matter what I do I don't get the desired result.
I need to color in 3 shifts of 8h each.
My Chart has the X-Values ranging from 0 to 23.
My earliest shift starts at 5am.
I get the length and offset of each shift through an SQL Query in minutes.
Example Shift 1:
offset = Datediff from 0 to shiftstart -> 300 min
length = Datediff from shiftstart to shiftend -> 480 min
My intuition tells me that since I have 24 X-Values in my chart, I need to set intervalType to hours or days with either 24 or 1 as value.
I interpret it as "Every Day/24h begin drawing the specified Stripline at its offset-Value with the specified length".
intervalOffsetType would be Minutes.
In my mind, the Offset works in conjunction with the selected IntervalType and since my shift starts at 5am each day, I suspect that intervalOffset needs to be 300.
Which would mean: "Begin drawing the stripline at 5am".
the striplineWidth-property then determines the the width, or rather length of the shift and its type, again, works in conjunction with the IntervalType.
Evidently this is not the case though.
My Settings:
My Result:
Can someone explain to me how the Interval Properties work?
I can't find any proper documentation on them either.
The solution to my problem was on the axis-options.
(rightclick x-axis -> properties)
Switching from category to scalar and setting the intervalType produces the desired result.
I'd need to test it further but for now I think having axis-type set to category applies the stripline to each member of a categorygroup in a chart.
Related
I am having an issue with a cross table that I would like to sort. On the vertical axis I have some categories, and on the horizontal axis I have time. The table itself is filled with the value that is related to the previous two. I created a rank, which seems to be correct, but when I sort that rank, I seem to get a random order of numbers (example is the upper 10 for ascending order):
4971 - 420 - 4959 - 1 - 4969 - 4970 - 16 - 2 - 7 - 420
The value I ranked is somewhat odd:
=Last([X]) - Last(Previous([X]))
Where X is a measurement.
I already checked if I am using other sortings that I might have overlooked, but this is not the case. Also I am sure that this ranking is a number. I use merged items for the categories, and I used the combines object instead of one of the 'childs'.
Can someone tell me what I am overlooking?
I am on BO 2016, SP2.
The issue is solved by making a variable Delta which is =abs(Previous[X]-X). I also made a new variable that shows the current time, and I sort on Delta where the current time is equal to the time in the last column.
I have to compare two values changing in both directions (rising and falling) within an hour (items amount, for example). What formula may I use to calculate if the amount drops or rises on more than 20%? Does Zabbix calculated value support if conditions to support positive and negative change or it's possible to bypass it?
I'm trying to write something like this:
{api20prod:mysql.get_active_offers.count(0)}/{api20prod:mysql.get_active_offers.count(,,,1h)}*100 > 20
but what if mysql.get_active_offers.count(0) more than mysql.get_active_offers.count(,,,1h) ?
You cannot use a "Simple Change" preprocessor because:
If the current value is smaller than the previous value, Zabbix
discards that difference (stores nothing) and waits for another value.
If you set the item with a 1h check interval (or with scheduled intervals at a specific minute of every hour), you can do the trick with the last() function.
Let's say that at 12:00 your item equals 25 and at 13:00 it equals 38:
At 13:00 invoking last() without parameters will return 38
At 13:00 invoking last(#2) will return 25
You can calculate the hourly readings delta % with:
100 * ({api20prod:mysql.get_active_offers.last()} - {api20prod:mysql.get_active_offers.last(#2)}) / {api20prod:mysql.get_active_offers.last(#2)}
This syntax should work either in a trigger or in a calculated item, choose the one that suits you better: I suggest a calculated item.
Of course, your trigger will have a double condition: you need to match "> 20" OR "< -20"
If you don't want to change the item's check interval you can use the avg() function, see the documentation.
I am using SQL Server Reporting Services 2016, I need some advice on the following statement I have in the top row of a Tablix in SSRS inside a textbox, the stament has a few expression within the text:
The total number of referrals received so far in this reporting period
is 1427. This is a -6% «Expr3» when compared to the 1518 received in
the same period of the previous reporting year.
In this example I would like «Expr3» to say "Decrease" because -6 is a negative number.
«Expr3» ---The issue I have is I need to work out <>, I would like to display either Increase or Decrease based upon the value of «Expr2», if «Expr2» is a positive number then I want this value for «Expr3» to show the word "Increase" and if «Expr2» value is a negative number then I want «Expr3» to show "Decrease".
Below my value behind the other expressions
«Expr1»
=Sum(Fields!ID.Value, "01_TotalReferralsInThisPeriod")
«Expr2»
= ((Code.Divide(
(Sum(Fields!ID.Value, "01_TotalReferralsInThisPeriod"))
,
(
Sum(Fields!ID.Value, "02_TotalReferralsInLastPeriod"))
))-1)*100
Is there an expression which can do this for me?
Thanks
Your expression for Expr3 should be something like this:
=IIf(
((Code.Divide(
(Sum(Fields!ID.Value, "01_TotalReferralsInThisPeriod"))
,
(
Sum(Fields!ID.Value, "02_TotalReferralsInLastPeriod"))
))-1)*100
>= 0,
"Increase",
"Decrease"
)
This expression assumes that you want to include 0% as an increase, that can of course be changed to fit your needs by modifying the >= 0.
If you are going to have the word "increase" or "decrease" after the percentage though, you may want to display the absolute value of the percentage -- this may just be semantics but it would be a little confusing to me to see a "-6% Decrease", as the double negative implies an increase. If you wanted to change that, just wrap Expr2 in the abs function like so:
=Abs(
((Code.Divide(
(Sum(Fields!ID.Value, "01_TotalReferralsInThisPeriod"))
,
(
Sum(Fields!ID.Value, "02_TotalReferralsInLastPeriod"))
))-1)*100
)
Take Datetime and give the half hour band it belongs to, irrespective of the date, just interested in the time.
There is as far as I can see, no time periods in SSRS, I need half hour time periods, that's 48 blocks in a day.
I would like to plot my data in bar chart,the interval for the bar width is along the x axis, the height is the occurrences on the y axis. I need an interval of half hour(the width of the histogram),I don't want to run some IIF/CASE statement, I would rather, convert the DateTime i have to a band on each row of data, what's the best way to output so I get half hour intervals along the X axis.
I don't want to run some IIF/CASE statement
By this I assume you mean you don't want 48 layers of IIF/CASE. Here's an SSRS expression that'll band a datetime just using a single IIF:
=DateAdd(DateInterval.Minute, 0-
IIF(Minute(Fields!DATETIMEFIELD.Value) <= 29, Minute(Fields!DATETIMEFIELD.Value), Minute(Fields!DATETIMEFIELD.Value) -30),
DateAdd(DateInterval.Second, 0-Second(Fields!DATETIMEFIELD.Value) ,Fields!DATETIMEFIELD.Value))
This removes the seconds from the time, and removes as many minutes necessary to get to the previous half-hour. You could likely use the same logic with different syntax as a column in your SQL query, if you prefer.
Use this calculated value for all the relevant parts of your SSRS chart.
Alright, this is kind of a convoluted problem, so bear with me:
I have a chart that displays 25 hours worth of data from rows sent to it. The hours of the data are to be displayed starting and ending with the 22nd hour. That is, the x axis goes 22, 23, 0, 1, 2, ... 22. It's important to note that there are two 22nd hours on two separate days.
Now, it is possible that the database will not return some rows. In which case, there must be an empty space for that hour. However, there must still be 25 x axis values.
This combination of restrictions has me stumped. I can't represent the x axis as a custom scalar, because the values are to be displayed out of order and duplicated. And I can't find a way to use an x axis category because I won't get all of the categories from the data and, again, there is a duplicated 22nd hour.
Any help is appreciated, let me know if I can provide any additional information.
I would add a column to the dataset to calculate a "relative hour". This would start with a value of 0 for the 22nd hour, 1 for the 23rd etc finishing with 25 for the 2nd 22nd hour.
Then I would change the Category Group definition in the Chart to use that "relative hour" value as the "Group On" value. Note the Label can remain as is.
I would change the source dataset so that it always returns a row for all the 25 x axis values, e.g. via a right join to a numbers table. Rows representing those "missing" hours will need both the "relative hour" value and your existing hour column value for the label.