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

help comparing fields in two columns using if statement

hey everyone, I am relatively new to the community. I have a question. I have a table shown below

I need a statement that will select the higher revenue if profit in Q1 and Q2 of id 1 are the same.

Thanks!

3 Replies
sunny_talwar

Where are you looking to do this? in a straight table or another object? What are you dimensions in the object? Can you supply us with a sample to check this out?

jonathandienst
Partner - Champion III
Partner - Champion III

In a straight or pivot table, something like this:

If(Count(TOTAL <id> Quarter) > 1 And Count(TOTAL <id> Distinct Profit) = 1, Max(TOTAL <id> Revenue), Revenue)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

thanks guys for the response, so this is the main table. Please dont mind the erased part, they are same number>

as you can see different plants have different storage locations. I need another field that will serve as a flag to indicate the higher current stock if the storage locations are same but different plants.

I hope that makes sense. Please your response will be greatly appreciated.

Thanks!