Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Computing Sums with different Dates and Dimensions

Hy people,

I have a litle problem making a sum procedure and i'm not sure witch is the best way to deal with it.

Imagine:

Variable A , witch have to number 1 and 2;

Variable B, witch is a date  and has 10 entries from 2011 (the dates differ with the number 1 or 2 from variable A)

Variable C, witch is sales

Not i want a table like that:

Variable A     Variable B              Variable C

1                  Min(Variable B)       Sum({$<Variable B={$(=min(Variable B))>} Variable C)

2                  Min(Variable B)       Sum({$<Variable B={$(=min(Variable B))>} Variable C)

When i apply this it doesnt work and mybe is because is assuming the min data for the entiry database and not for the Dimension of Variable A.

I solve out if i compute the min of each Variable A in script but mybe should be an easy way to deal with it.

Anyone could help?

Thanks,

Eliano

4 Replies
chematos
Specialist II
Specialist II

Hi Eliano,

maybe is not working because the syntax, you could add the comas, try this:

Sum({$<Variable B={"=$(=min(Variable B))" } >} Variable C)

Regards,

Chema

Not applicable
Author

It's not working.

I've tried in different forms.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

If those are the actual field names, you will need to wrap with [ ], as in [Variable A] and use the expression in the previous post.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Jonathan, thanks.

Its not that problem.

Is quite difficult actually because he needs to compute the minimum date of each variable a and them sum the expression.