Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
krishnakv83
Contributor II
Contributor II

What is column purpose

Hi guys,

if ( (column(1)-sum(PLANNED_SALES_RETAIL)) < 0 , (column(1)-sum(PLANNED_SALES_RETAIL)) *-1,(column(1)-sum({<FLAG_YTD={'Y'}>}PLANNED_SALES_RETAIL)))

In the above formula what is purpose of column(1) ?Pls help me understand

Regards,

Venkat

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Column(1) refers to the result of the first expression in the table or chart.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Chanty4u
MVP
MVP

what ever the expression which u hve used in ur  First expression  ur chart or table.

if that expression is  complex...at that time we can use column names.

hope this helps u

engishfaque
Specialist III
Specialist III

Dear Krishna,

Column and Expression both are same in charts. For example you have a chart where there are two expression for Sales and Expenses. But you want to calculate profit in third expression. So you didn't need to write whole expression for Sales and Expenses. You can just write that Profit = Column(1) - Column2.

Example 1:

Column(1) means Expression1

Column(2) means Expression2

Example 2:

Expression1/Expression2 both are labels then you can also write Expression1/Expression2 instead of complete expression or Column(1) or Column(2).

Listed below expressions will return you same result

--

Profit = Sum(Sales) - Sum(Expenses)

Profit = Column(1) - Column(2)

Profit = Expression1 - Expression2

Please note, Profit formula can be change according to your requirements. Given above Profit formula is only for quick understanding.

Kind regards,

Ishfaque Ahmed

krishnakv83
Contributor II
Contributor II
Author

Thank you all for the reply.Now I understood advantages of column(1) .It is very useful for lengthy expressions.

Chanty4u
MVP
MVP

yes exctly....

if u got the solution please close this thread by making helpful and correct answer above. if not please raise ur quires

Qlik Community Tip: Marking Replies as Correct or Helpful