Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Trying to achieve Amt% based on year and country filter, any idea/suggestion to resolve this formula issue. Thanks
Used below formula to get Amt%
=(Sum({<Country={$(vCountry)},Year={$(vCurrYear)}>}amt)/sum(amt))*100
and got below output (Amt% column wrong results showing)
expected output is like below Amt% column values
You did not have a variable called vCurrYear in your app. This worked:
=Sum({<Country={$(=vCountry)}, Year={$(=vYear)}>} amt)/Sum(TOTAL {<Country={$(=vCountry)},Year={$(=vYear)}>} amt)
Hi
try this
=(Sum({<Country={$=(vCountry)},Year={$=(vCurrYear)}>}amt)/sum(amt))*100
May be this:
=Sum({<Country={$(vCountry)},Year={$(vCurrYear)}>} amt)/Sum(TOTAL {<Country={$(vCountry)},Year={$(vCurrYear)}>} amt)
! ! !!Hi Sunny,
I've tried with your suggested formula and still shows wrong result, please find the attached document. Thanks
Hi Allu,
Tried with your updated formula and still it's gave "-" like that. please advise. Tks
You did not have a variable called vCurrYear in your app. This worked:
=Sum({<Country={$(=vCountry)}, Year={$(=vYear)}>} amt)/Sum(TOTAL {<Country={$(=vCountry)},Year={$(=vYear)}>} amt)
Hi Devasaru,
You are using vYear for storing year but you are using vCurrYear in expression. Please change either one.
Also, you don't need to put vCountry as 'Norway' (with quotes), you can keep it as Norway only.
Hope it helps.
Regards,
Sakir
Hi Sunny,
Thanks for your valuable input, can you suggest me to overcome
"Please note: your content was added successfully, but a moderator needs to approve it before it can be posted." this messeage issue while post new thread into new to qlikview forum.
Check this out: