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

Form separate columns for the status

Hi,

 

I have the data of 3 month end sales with vMaxDate as today and vMonthEndMinus1 as last month data.

Baavik_0-1701888489928.png

 

Now by comparing Jan, Feb, Mar sales-

                                   if all the 3 values are same - status is 'Same'

                                 if current sales > previous sales - 'Improve'

                                 if current sales < previous sales -'Deteriorate'

The expected output is , 3 separate columns are needed for each status with total count of Status.

Baavik_1-1701888518690.png

 

Need help in the logic to form  separate columns in back end. Thanks !!

 

Labels (1)
2 Replies
Taoufiq_Zarra

@Baavik  if I understood correctly

from this input :

Taoufiq_Zarra_0-1702073625547.png

 

you can add table or chart and ;

dimension : Product

measure 1 : Count(If(Status = 'Improve', [staff id])) -> Improve in the name

measure 2: Count(If(Status = 'Worsen', [staff id]))-> Worsen in the name

measure 3: Count(If(Status = 'Stable', [staff id])) -> Stable in name

the output:

Taoufiq_Zarra_1-1702073747912.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Baavik
Contributor III
Contributor III
Author

@Taoufiq_Zarra - Thanks for this!!

But I need to get the status column based on the comparison of selected months data.

User wants to select any 2 random months from the Month filters and compare data in the same table as below - 

Baavik_0-1704708921951.png