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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

comparing two columns in set analysis

Hello

I got a qlikview document that has the following tables:

Daily Sales

Business Units

Calendar

The Calendar has a field called [Transaction Date] linked to the Daily Sales

and the Daily Sales has a field [BU Code] that links it to the table Business Units

Each business unit has an [Open Date] that determines when the businees unit was open

Now the user selects the Year 2012 and Week 14

in a chart I want to find the following:

The sales of each business unit that correspond to the transactions that have date ([Transaction Date]) at least one year after the opening date of the business unit

I wrote the following expression yet it is giving me nothing!

sum

          (

                    {

                    <

                                        H_Flag={'Sales'},

  [H_Transaction Date] = {">= $(=AddYears([Open Date],1))"}//,

  >

                      }

                    [Sales Amount USD]

          )

Please advise

I can walk on water when it freezes
5 Replies
jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

Your set analysis is wrong. B'coz we need to compare with values in set analysis, but you are comparing with field data.

For example:

H_TransactionDate={">=$(=Min(OpenDate))"}

ali_hijazi
Partner - Master II
Partner - Master II
Author

How Min(OpenDate)?

I need to compare with open date of each business unit

I can walk on water when it freezes
ali_hijazi
Partner - Master II
Partner - Master II
Author

How to add one year to the minimum of the Open Date as you are suggesting?

I can walk on water when it freezes
jagannalla
Partner - Specialist III
Partner - Specialist III

Can you attach sample file and also explain the output what you want i.e. Show the data of chart in image or table view.

ali_hijazi
Partner - Master II
Partner - Master II
Author

Check attached document

in the chart the Tezenis brand should have some value for sure less than the one it is shown since this shop was opened on 5/5/2011

We are actually calculating the Like for like sales in the first column

I can walk on water when it freezes