Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

1 Reply
swuehl
MVP
MVP

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