Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to display avg value of selected metric in text box.
I have created inline table having 5 metrics as those i have in table(database)
I have a list box having those five metrics,i want on selection in list box i should get value in text box.
Inline table:
MetricsOptions1:
LOAD * INLINE [MetricsNo,Metrics
1,Investment as % of GDP
2,Revenue % of GDP
3,Expenditure % of GDP
4,Net Debt % of GDP
5,CA Deficit % of GDP
];
Variable:- vGDPbased=Metrics
TextBox:- =num(avg({<Country={'Brazil'}>}vGDPbased),'#.##%')
But i am getting '-' in text box
Please help me
Try defining your variable vGDPbased as = '[' & Metrics ']'. And change the expression to =num(avg({<Country={'Brazil'}>} $(vGDPbased)) ,'#.##%')
See attached qvw for an example.
Hi.
There are some mistakes.
First, 'Investment as % of GDP' is not an expression to get the Investment as % of GDP.
You have to add another field and write correct expressions for calculating each metrics.
Then use it instead of Metrics field.
Second, to substitute the vGDPbased value, you have to use $-sign expansion:
TextBox:- =num(avg({<Country={'Brazil'}>} $(vGDPbased)),'#.##%')
Try defining your variable vGDPbased as = '[' & Metrics ']'. And change the expression to =num(avg({<Country={'Brazil'}>} $(vGDPbased)) ,'#.##%')
See attached qvw for an example.