Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a straight table and want to replace/hide the columns in case my cycle box gets a new value.
Example:
My cycle box contains bike and car. In case i choose car i want different columns shown with the car attributes. In case i choose bike the car columns shouldn't be shown and be replaced by the different bike columns.
I tried to set up the conditional for columns under presentation but it doesn't worked!
Many thanks,
Harry
Use the getcurrentfield function to retrieve the name active field in the cylce group. You can use this in the conditional expression. For example =if(getcurrentfield(MyCyclicGroup)='car',1,0) for the fields that should be shown when car is the active field in the cycle group MyCyclicGroup
Thanks! I tried the following and it doesn't work:
=IF(GetCurrentField('MyCycleBox')='bike',if(aggr(rank(sum(bike.sales)),bike.sales)<=10,bike.sales),NULL())
Could you give me a short example .qvw which is working with your solution?
Many Thanks,
Harry
Try using square brackets instead:
=IF(GetCurrentField([MyCycleBox])='bike',if(aggr(rank(sum(bike.sales)),bike.sales)<=10,bike.sales),NULL())
attached is an example
i think square brackets is the issue, but the remaining syntax in your expression may yield other issues, if it doesn't work, make it a real simple expression and then add to the expression incrementally (testing each time) until you get it doing the aggr() , rank() etc... the way you want.
Many thanks Jonathan!
Your example is working great and I solved my problem!
Many thanks again,
Harry