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: 
yahiaoui
Contributor II
Contributor II

comparison with QV

Hi all, I want to do a comparison with QlikView which allows me when I shoose for exemple a Month , in the Barchart I get 2 bars the first ine is for the month that I selected and the selcond one for the previous month.
For exemple if I shoose June, I get tow bars , one for June and one for May.
Thanks

Labels (1)
1 Reply
swuehl
Champion III
Champion III

You can do this using set analysis, something like this:

Create a sequential month number field in the script (assuming your Month field is a dual value with numeric representation)

Data Types in QlikView

LOAD

     Sales,

     Month,

     Year,

     Year*12+Month as MonthNo

FROM ....;

first expression:

=Sum(Sales)

second expression:

=Sum({<MonthNo = {$(=Max(MonthNo)-1)}, Month=, Year=>} Sales)

See also:

The Magic of Set Analysis - Point In Time Reporting • Blog • AfterSync