Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
sibrulotte
Creator III
Creator III

AGGR () and comparative set analysis

Hey, so I tried this and it's pretty accurate for the most part.

This is my current: 

sum (aggr(round(sum({$<[%CLE_Type_Transaction_ID] -= {'EB', 'EA'}, [Numéro du type d'écriture] -= {'FERM'} >}([Montant cumulé aad])* %CR004M)),[Niveau 2 ERD],[Niveau 3 ERD],[Niveau 4 ERD],[Description de l'extra]))

All the values are on point.

This is my comparative: (same set analysis, I just add the comp1 period) 

sum(aggr(round(sum({$<[%CLE_Type_Transaction_ID] -= {'EB', 'EA'}, [Année-période financière]= [Année-période financière comp 1], [Numéro du type d'écriture] -= {'FERM'} >}([Montant cumulé aad])* %CR004M)),[Niveau 2 ERD],[Niveau 3 ERD],[Niveau 4 ERD],[Description de l'extra]))

Unfortunatly this one skips over some aggregations of the [Description de l'extra] that are no longer existing in the "current" period.

IE, I'm missing values for extra "XYZ" that exist in the comp 1 period, but not in current period.

What do I do to work around this?

4 Replies
Nicole-Smith

Try like this:

sum(aggr(round(sum({$<[%CLE_Type_Transaction_ID] -= {'EB', 'EA'}, [Année-période financière]={'=[Année-période financière comp 1]'}, [Numéro du type d'écriture] -= {'FERM'} >}([Montant cumulé aad])* %CR004M)),[Niveau 2 ERD],[Niveau 3 ERD],[Niveau 4 ERD],[Description de l'extra]))

Or like this:

sum(aggr(round(sum({$<[%CLE_Type_Transaction_ID] -= {'EB', 'EA'}, [Année-période financière]={'=[Année-période financière]=[Année-période financière comp 1]'}, [Numéro du type d'écriture] -= {'FERM'} >}([Montant cumulé aad])* %CR004M)),[Niveau 2 ERD],[Niveau 3 ERD],[Niveau 4 ERD],[Description de l'extra]))

sibrulotte
Creator III
Creator III
Author

Are you sure about that synthax?

sum(aggr(round(sum({$<[%CLE_Type_Transaction_ID] -= {'EB', 'EA'}, [Année-période financière]={'=[Année-période financière comp 1]'}, [Numéro du type d'écriture] -= {'FERM'} >}([Montant cumulé aad])* %CR004M)),[Niveau 2 ERD],[Niveau 3 ERD],[Niveau 4 ERD],[Description de l'extra]))

That gave a bunch of zeros.
I added the usual $(  to evaluate and get this

 

sum

(aggr(round(sum({$<[%CLE_Type_Transaction_ID] -= {'EB', 'EA'}, [Année-période financière]={'$(=[Année-période financière comp 1])'}, [Numéro du type d'écriture] -= {'FERM'} >}([Montant cumulé aad])* %CR004M)),[Niveau 2 ERD],[Niveau 3 ERD],[Niveau 4 ERD],[Description de l'extra]))

Same results as mine, missing values.

 

For this attempt:

sum(aggr(round(sum({$<[%CLE_Type_Transaction_ID] -= {'EB', 'EA'}, [Année-période financière]={'=[Année-période financière]=[Année-période financière comp 1]'}, [Numéro du type d'écriture] -= {'FERM'} >}([Montant cumulé aad])* %CR004M)),[Niveau 2 ERD],[Niveau 3 ERD],[Niveau 4 ERD],[Description de l'extra]))

Bunch of zeros. even if I try tthe $() to evaluate.

Thanks for the try

Nicole-Smith

One more try...

sum(aggr(round(sum({$<[%CLE_Type_Transaction_ID] -= {'EB', 'EA'}, [Année-période financière]=P([Année-période financière comp 1]), [Numéro du type d'écriture] -= {'FERM'} >}([Montant cumulé aad])* %CR004M)),[Niveau 2 ERD],[Niveau 3 ERD],[Niveau 4 ERD],[Description de l'extra]))

sibrulotte
Creator III
Creator III
Author

I didn't think about trying the "possible".

But I'm still missing the values