Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I am trying to work out an Only function with the use of some variables instead of fields
the idea is to get the population when one selects the city and the age group
the fields are
City, <14, 15-24, 25-34, etc
and the variables are vCity and vAge,
so the user selects the city and the age group and they should get the population as a result of this function:
only({<City=vCity>} vAge), apparently this is not correct,
thanx!
Hi,
Have a look at the attached File.
Hope this is what you were trying to achieve.
Regards,
Kaushik Solanki
Try this,
only(Population)
But only will work only when you have only one value for selection.
Regards,
Kaushik Solanki
thank you for the feedback, but I am a bit confused,
you see the fields are
City, <14, 15-24, 25-34, etc
and the variables are vCity and vAge,
I have to select the City ( the row via the vCity variance) and the age group (the column via the vAge variance) to get the correct value which is the population.
Am I too confusing?
thank you
Hi,
Kindly post your qvw file. That will be helpful to me in understanding your problem.
Regards,
Kaushik Solanki
hi, here it is
thank you!
Hi,
Have a look at the attached File.
Hope this is what you were trying to achieve.
Regards,
Kaushik Solanki
Thank you for the hint! very helpful,
I guess ONLY does not work with variables? or I should try approaching it otherwise?
Best regards
Hi,
It can work.
Have a look at the attached file.
Regards,
Kaushik Solanki
I see, I have to make the crosstable either way.
again, thank you
Using the CROSSTABLE is probably the more QV way of doing it, selecting in fields instead of using variables to analyze your data.
But just as a note, you can do it like you initially tried:
=only({<CITY= {$(vCITY)} >} [$(vAGE)] )