Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a report with a bar chart that is showing the run time of jobs for a server. I have a cyclic group that can change between Day of the month, month, year, and day of week. If I select "Day" under the cyclic group, a specific year, and month, I can se my specific run time for that day, but if I change the cyclic to month, it gives me total hours of runtime for that job for the entire month. I need the average time it took to run for the month. When on day of the week, I need to see average runtime for that day of the week and ect...
Any ideas on how to do this using a cyclic group without making separate charts for Day, Month, Year, and Day of Week? I need a different expression bases on what is selected in the cyclic group.
I have attached an example of my report for reference.
You can use GetCurrentField([Date Group]) in the conditional box of the expression, then make different expressions based on the value of the cycle group.
Ex. Expression 1: set the Conditional box as GetCurrentField([Date Group]) = 'Year'
Expression 2: set the Conditional box as GetCurrentField([Date Group]) = 'Month'
...and so on. Then expression 1 will only be calculated if your cycle group is on year, expression 2 will only be calculated if the cycle group is on month, etc. Just make sure that all possible options of your cycle group are included in the conditional expression or you will get the error "all expressions are disabled".
You can use GetCurrentField([Date Group]) in the conditional box of the expression, then make different expressions based on the value of the cycle group.
Ex. Expression 1: set the Conditional box as GetCurrentField([Date Group]) = 'Year'
Expression 2: set the Conditional box as GetCurrentField([Date Group]) = 'Month'
...and so on. Then expression 1 will only be calculated if your cycle group is on year, expression 2 will only be calculated if the cycle group is on month, etc. Just make sure that all possible options of your cycle group are included in the conditional expression or you will get the error "all expressions are disabled".
I'd rather avoid downloading 18+ MB file, so I'll try to explain.
You can use function GetCurrentField() - it returns the name of the current field in cycle. So, something like that:
pick(match(GetCurrentField(YourCyclicGroupName),'Day','Month','Year','Week'), <expression for Day>,<expression for Month>,<expression for Year>,<expression for Week>)
Awesome, Thanks! I did not know about the GetCurrentField function for groups. Very useful