Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am facing a peculiar problem when using a calculated dimension in a pivot report. (on QV version 8.5 and 9.0)
I am making use of a variable that would determine what dimension field the report should use. e.g. =$(vDimLevel)
Everything works well, the report gets populated with the required dimension values, untill I click on the "CLEAR" button. I get a runtime error and I have to close the program.
When I add the same dimension explicitly, there is no problem with the data or its refresh.
Suggestions/ help is most appreciated and also required urgently 🙂
Thanks much!!
Hi,
I d'ont understand what you're trying to do, the user have to write the name of the dimension he wants ?
Why not using a Group with different possible dimension to choose the dimension ?
Try using
=[$(vDimLevel)]
Just a thought: May be when you click on clear it clears the value in the variable also and you end up having a chart without a dimension which I guess is not possible to have and leading to the runtime error.
-Amit.
Thanks folks for responding so quickly!!
Amit, you hit the nail on the head!!
Ofcourse the variable was pointing to a selected data field, and it would have no value when selections were cleared up.
BUT now I am struggling to get the condition working for the calculated dimension. I am trying to use another field to be used when "the" variable gets cleared up. The expression looks like,
=if(len('$(vDimLevel)')>0,$(vDimLevel),[Corporate]) when I use the field name itself
OR
=if(len('$(vDimLevel)')>0,$(vDimLevel),$(vCorporate)) when I use another variable which always points to field "Corporate" similar to $(vDimLevel)
NEITHER SEEMS TO BE WORKING!!
Any ideas on this one 🙂
Thanks again!!
Should have added. The $(vDimLevel) works but the [Corporate] / $(vCorporate) piece does not....
I'll ask a question that was asked previously...
Why can't you create a dimension group (either cyclic or drill-down) to be able to choose different dimensions? (Dimensions tab, Edit Groups button)
What you're explaining seems like a perfect place for a cyclic group.
sjprows