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

Sorting problem when using if with set analysis - in a pivot table

Hello community,

I have a pivot table, which holds one measure, with an expression that works well:

Count({<Fictive_Row={0},Car_zeroKm_Flag = {0}, FlagTradeIN ={0},Flag_In_Stage={1},Current_Stock_Date ={1} >} Distinct License_Plate_Number_Stock)

But, when i try to use a condition as following, the sorting gets mixed up:

 If(GetSelectedCount(Year)=0 and GetSelectedCount(MonthOfYear)=0 
,Count({<Fictive_Row={0},Car_zeroKm_Flag = {0}, FlagTradeIN ={0},Flag_In_Stage={1},Current_Stock_Date ={1} >} Distinct License_Plate_Number_Stock)
,Count({<Fictive_Row={0},Car_zeroKm_Flag = {0}, FlagTradeIN ={0},Flag_In_Stage={1} >} Distinct License_Plate_Number_Stock))

The sorting that is chosen is "Sort by first measure" in both cases

Does anyone know why it happens, and how to fix it?

Thanks,

Peleg.

 

Labels (3)
0 Replies