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: 
silvia_assuncao
Creator
Creator

help with expression - aggregation DIFFERENT MONTHS

Hi!

Please could someone help me with this expression problem.

the aggregation was working perfectly, until I added the months as dimensions, and I'm not getting to rebuild the expression so that I'll have the right value each month.

total values by month should be as the first chart.

find the file attached hereQV PROBLEM.PNG

11 Replies
sunny_talwar

Can you check if this is what is needed:

Avg({<[Unique Resource ID] = {"=Len(Trim([Unique Resource ID])) > 0"}>} 1) *

RangeSum(

Sum(TOTAL <[Unique Account ID], [Reference Month]> {<[Adjust Type]= {'C'}, [Registry ID] = {'70'}, [Adjust Signal] = {'-'}>} [Adjust Amount]*(-1)/100),

Sum(TOTAL <[Unique Account ID], [Reference Month]> {<[Adjust Type]= {'C'}, [Registry ID] = {'70'}, [Adjust Signal] = {'+'}>} [Adjust Amount]/100),

Sum(TOTAL <[Unique Account ID], [Reference Month]> {<[Discount Type] = {'C'}, [Discount Signal] = {'-'}>} [Discount Amount]*(-1)/100),

Sum(TOTAL <[Unique Account ID], [Reference Month]> {<[Plan Type] = {'C'}, [Registry ID] = {'60'}>} [Plan Amount with Taxes]/100))

/

If(Dimensionality() = 3,  Count(TOTAL <[Unique Account ID], [Reference Month]> DISTINCT {<[Unique Resource ID] = {"=Len(Trim([Unique Resource ID])) > 0"}>} [Unique Resource ID]), 1)



silvia_assuncao
Creator
Creator
Author

Hi Sunny, when I collapse all the information and stay only with cost center showing the values showed for cost center are not correct.

could you please help me once more?

thanks