Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
As per requirement if FRQ_Type is A then i need to show Q4 data for FRQ_TYPE A,otherwise need to put Q4 data for FRQ type Q
For one particular year
But after appyling if else condition in set analysis below expression is not working
if(FRQ_TYPE='A',Avg({<INDICATOR_NAME={'% of Non-Bank Private Debt to Nominal GDP'},COUNTRY={'Singapore'},FRQ_TYPE={'A'},QUARTER={'Q4'}>}INDICATOR_VALUE),
Avg({<INDICATOR_NAME={'% of Non-Bank Private Debt to Nominal GDP'},COUNTRY={'Singapore'},FRQ_TYPE={'Q'},QUARTER={'Q4'}>}INDICATOR_VALUE))
plz suggest on this.
Thanks
Hi,
What issue are u getting.. if possible share sample app.
Please find attached sample application for this
What if FRQ_TYPE is other than A or Q?
Hi Deepak, the first "if" will return several values for each year, so it will return null and the "if" will go (almost) always for the "else", try with this expression:
if(MinString(FRQ_TYPE)='A',Avg({<INDICATOR_NAME={'% of Non-Bank Private Debt to Nominal GDP'},COUNTRY={'Singapore'},FRQ_TYPE={'A'},QUARTER={'Q4'}>}INDICATOR_VALUE),
Avg({<INDICATOR_NAME={'% of Non-Bank Private Debt to Nominal GDP'},COUNTRY={'Singapore'},FRQ_TYPE={'Q'},QUARTER={'Q4'}>}INDICATOR_VALUE))
There are 5 years (2005-2009) that have both A and Q values for FRQ_TYPE. What do you want to do for those? Select FRQ_TYPE=A like Ruben suggests? In that case I think you better store FRQ_TYPE in your calendar so that it becomes a real dimension value tied to a particular year. As a result, your original expression will suddenly start to work.
And you can omit the IF clause and FRQ_TYPE={'A'} or {'Q'} modifier from your set spec. Makes things a lot simpler.
Peter.
hi peter
if FRQ type A is present then i need to put value for A otherwise need to show value for FRQ_TYPE Q for Q4
Can you please suggest how shall i go ahead in back end.
Thanks
Thanks Marin,
It is working fine initially.But after selecting FRQ type Q it represnets all values for FRQ type Q which is not required if FRQ type A present,if FRQ type A is not present then only i need to show value for FRQ type Q
thanks
Maybe ignoring selections when checking FRQ:
if(MinString({1} FRQ_TYPE)='A',Avg({<INDICATOR_NAME={'% of Non-Bank Private Debt to Nominal GDP'},COUNTRY={'Singapore'},FRQ_TYPE={'A'},QUARTER={'Q4'}>}INDICATOR_VALUE),
Avg({<INDICATOR_NAME={'% of Non-Bank Private Debt to Nominal GDP'},COUNTRY={'Singapore'},FRQ_TYPE={'Q'},QUARTER={'Q4'}>}INDICATOR_VALUE))
hi,
Still it is not working for else part when all data is present.
thamks