Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have created a chart with cycling expressions. One expression shows the total time of some field. The other expression shows the average time of some field. I would like the title to be "Total Time" or "Average Time" depending on which expression is cycled.
So far, I have been unsuccessful in searching for a solution to this problem and the getfieldselection option doesn't seem to me to work here. Can someone please give me some insight into this problem? Thank you.
In the definition of Groups, you can write in the LABEL the name as you need show it
Attaching the sample qvw with expected output.
You don't have to use any special functions to get the required results.
try something like this:
add a text box above your chart and try this expression
If(SubStringCount(GetCurrentField([cant-Imp]))>0,'Total Time','Average Time')
modify this expression as per your requirement
e.g
If(SubStringCount(right(left(trim(GetCurrentField([cant-Imp])),65),10),'Total Time')>0,'Total Time','Average Time')
Hope it helps
Do you mean that you clicked the Group button on the Expressions tab? GetCurrentField only works for dimension groups AFAIK. If you create a label for each expression, the column header will change when you cycle. For a chart, if you enable "Show Title in Chart", the title will follow the cyclic label.
But I don't think that there is any way to get the cyclic expression label to the caption for a table..
... except if you use the getcurrentfield() function in a Caption expression.
Thank you for the responses and the file. My personal edition will not allow me to recover this file so I cannot see it.
Let me clarify my original question. I know how to label an expression. Please reference the two photos below. They are of the same chart. The first chart has an expression for the total time. The second photo shows the same chart cycled to show the average time. Notice that the title of the chart has not changed. This is what I want to update as the end user cycles the expressions.
Sorry for not being clear earlier.
Aaahhh !!! I think i understand the question now.
What I would do is give up with the expression cycle, and instead :