Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
as a Qlik-Newbie I have the task to create a chart with the following formula from an older project:
Chart Main Expression =sum({$<likes = {1}>} Sales) / sum({$<likes_basis = {1}>}total <SubGroups> Sales)
If I put this into a measure formula, but unfortunately there is an Error, I think it's because of the <SubGroups> .
The only information I have is that SubGroups is a Dimension with three Items.
Could someone help me or give me a hint what do I have to look up in the Qlik help?
Sorry for the cryptic information.
Thanks in advance!
Hi all,
For later readers of this topic, here is the solution of what this expression means (unfortunately the Qlik help isn't very helpful here).
sum({$<likes_basis = {1}>}total <SubGroups> Sales)
First of all: I have a Stacked Bar Chart with dimensions "Likes_basis" and "Subgroups".
"total <SubGroups> Sales" then means that all the values of Likes_basis a calculated by each of the items of "Subgroups" regarding "Sales".
Best Regards
try below expression
=sum({<like = {1}>} sales)
/
sum(total {<likes_basis ={'1'}>} sales)
Thanks, this works (I've already tried this, indeed) , but I need the <SubGroups> for filtering, too.
Anyone an idea how to fix sum({$<likes = {1}>} Sales) / sum({$<likes_basis = {1}>}total <SubGroups> Sales)
sum({$<likes = {1}>} Sales) / sum({$<likes_basis = {1}>}total <SubGroups> Sales)
?
are you looking for something like this ?
sum({$<likes = {1}>} Sales) / sum({$<likes_basis = {1},Subgroups={'Item1'}>} Sales)
Looks good, I'll try this!
Thanks a lot!
Hi
can you try below steps.
take one KPI object and put below exp
sum({$<likes = {1}>} Sales)
take another KPI object and put below exp
sum({$<likes_basis = {1}>} Sales)
other kpi
sum({$<likes_basis = {1}>}total <SubGroups> Sales)
other KPI
sum({$<likes = {1}>} Sales) / sum({$<likes_basis = {1}>}total <SubGroups> Sales)
see the result which is having issue post the error screenshot here.
I've tried:
The first two KPIs work fine, in the third there is the Error: "Error in Expression" , I think the Syntax is not correct.
What can "total <SubGroups> Sales"
mean?
I've never seen anythink like this in Set Analysis.
try this
sum({$<likes = {1}>} Sales) / sum(total <SubGroups>{$<likes_basis = {1}>} Sales)
or
sum({$<likes = {1}>} Sales) /sum(aggr( sum({$<likes_basis = {1}>}total <SubGroups> Sales),SubGroups)
or
sum(aggr(sum({$<likes = {1}>} Sales) / sum({$<likes_basis = {1}>}total <SubGroups> Sales),SubGroups)
Great, thank you. I'll try this!
Thanks to the awesome crowd here! You helped me a lot!
Hi all,
For later readers of this topic, here is the solution of what this expression means (unfortunately the Qlik help isn't very helpful here).
sum({$<likes_basis = {1}>}total <SubGroups> Sales)
First of all: I have a Stacked Bar Chart with dimensions "Likes_basis" and "Subgroups".
"total <SubGroups> Sales" then means that all the values of Likes_basis a calculated by each of the items of "Subgroups" regarding "Sales".
Best Regards