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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
dmac1971
Creator III
Creator III

Current Month % Of Total

I have a straight table showing top 10 values by a dimension for the current month.  This works fine :

sum({<Year={$(=year(today()))},MonthNum={'$(=upper(Month(today())-1))'}>}Value)

I want to then work out the % of the current month for each of the lines, trying to use this but it only returns 100% ?  :

sum({<Year={$(=year(today()))},MonthNum={'$(=upper(Month(today())-1))'}>}Value)/sum({$<Year={$(=year(today()))},MonthNum={'$(=upper(Month(today())-1))'}>}Value)

Any idea where I am going wrong?

Labels (1)
1 Solution

Accepted Solutions
sushil353
Master II
Master II

Hi,

Try below expression:

sum({<Year={$(=year(today()))},MonthNum={'$(=upper(Month(today())-1))'}>}Value)/sum(Total {$<Year={$(=year(today()))},MonthNum={'$(=upper(Month(today())-1))'}>}Value)

HTH

sushil

View solution in original post

2 Replies
sushil353
Master II
Master II

Hi,

Try below expression:

sum({<Year={$(=year(today()))},MonthNum={'$(=upper(Month(today())-1))'}>}Value)/sum(Total {$<Year={$(=year(today()))},MonthNum={'$(=upper(Month(today())-1))'}>}Value)

HTH

sushil

dmac1971
Creator III
Creator III
Author

Of course, DOH!!!  Many thanks!