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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
bkn
Contributor II
Contributor II

Data is Summing in each record

Hi All,

I used variable to calculate the next two columns, and when i used that variable to pull data, the data is summing in each records/Lines.

Please see the attachment.

Thanks in Advance.

11 Replies
Anonymous
Not applicable

Could you share your variable and describe what you are hoping to achieve ?

MK_QSL
MVP
MVP

Press

CTRL + ALT + V

Select Your variable

From Variable Definition

remove = from the front

i.e. If you define variable as

=SUM(Amount)

make it as

SUM(Amount)

Now use

$(variable) in your expression

bkn
Contributor II
Contributor II
Author

I am storing this expression in variables and then i call this variable in table.

=If(UnbilledMonthName='FEB', SUM({<UnbilledMonthName={'NOV'},UnbilledFYYear={'$(vFYCurrentYear)'}>}[Unbilled Current Quarter])

,If(UnbilledMonthName='MAR', SUM({<UnbilledMonthName={'DEC'},UnbilledFYYear={'$(vFYCurrentYear)'}>}[Unbilled Current Quarter])

,If(UnbilledMonthName='APR', SUM({<UnbilledMonthName={'JAN'},UnbilledFYYear={'$(vFYCurrentYear)'}>}[Unbilled Current Quarter])

,If(UnbilledMonthName='MAY', SUM({<UnbilledMonthName={'FEB'},UnbilledFYYear={'$(vFYCurrentYear)'}>}[Unbilled Current Quarter])

,If(UnbilledMonthName='JUN', SUM({<UnbilledMonthName={'MAR'},UnbilledFYYear={'$(vFYCurrentYear)'}>}[Unbilled Current Quarter])

,If(UnbilledMonthName='JUL', SUM({<UnbilledMonthName={'APR'},UnbilledFYYear={'$(vFYCurrentYear)'}>}[Unbilled Current Quarter])

,If(UnbilledMonthName='AUG', SUM({<UnbilledMonthName={'MAY'},UnbilledFYYear={'$(vFYCurrentYear)'}>}[Unbilled Current Quarter])

,If(UnbilledMonthName='SEP', SUM({<UnbilledMonthName={'JUN'},UnbilledFYYear={'$(vFYCurrentYear)'}>}[Unbilled Current Quarter])

,If(UnbilledMonthName='OCT', SUM({<UnbilledMonthName={'JUL'},UnbilledFYYear={'$(vFYCurrentYear)'}>}[Unbilled Current Quarter])

,If(UnbilledMonthName='NOV', SUM({<UnbilledMonthName={'AUG'},UnbilledFYYear={'$(vFYPriorYear)'}>}[Unbilled Current Quarter])

,If(UnbilledMonthName='DEC', SUM({<UnbilledMonthName={'SEP'},UnbilledFYYear={'$(vFYPriorYear)'}>}[Unbilled Current Quarter])

,If(UnbilledMonthName='JAN', SUM({<UnbilledMonthName={'OCT'},UnbilledFYYear={'$(vFYPriorYear)'}>}[Unbilled Current Quarter])))))))))))))

MK_QSL
MVP
MVP

Remove = from the start of variable declaration and try...

Anonymous
Not applicable

...  and you need the UnbilledMonthName as one of dimensions...

bkn
Contributor II
Contributor II
Author

Summing Issue.PNG

bkn
Contributor II
Contributor II
Author

This is what i see now...When i insert expression in table instead of variables.

Thanks.

bkn
Contributor II
Contributor II
Author

I tried. Its not working.

bkn
Contributor II
Contributor II
Author

Hi Guys, it works now. The problem was "=" sign in variables. I removed that and got the exact result that desired. Thankyou for you time. Appreciated.