Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
wale_martins
Contributor III
Contributor III

SUPRESS NULL VALUES BUT SHOW ZERO VALUES

Hi there,

I've been fighting for a long, trying to supress "null values" in a rank expression when "supress Zero-values" option is unchecked, but there's no way...

Anybody have an idea...

That's my expression:

IF(RANK(TOTAL COUNT({<AÑO={$(=(vYearSelect))}>}DISTINCT ID_VISITA),4)>40,

    COUNT({<AÑO={$(=(vYearSelect))}>}DISTINCT ID_VISITA))

In the attached file, you can see that the first 40 values appear as null, but appear.... the thing is that I want don't want to show them but I want to show the last 5 values with the 0 result. So, that's why I have unchecked the "supress Zero-values" option.

Thank you in advance

Wale

1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

Please try this expression again?

COUNT({<AÑO={$(=(vYearSelect))},

COD_EMPRESA={'=RANK(TOTAL COUNT({<AÑO={$(=(vYearSelect))}>} DISTINCT ID_VISITA),4)>40'},AÑO={$(=(vYearSelect))}>

}TOTAL <COD_EMPRESA> DISTINCT  ID_VISITA)

View solution in original post

24 Replies
olivierrobin
Specialist III
Specialist III

hello

i would rather it is missing values (no visits for this dimension)

so i would check "suppress missing values" in presentation tab

wale_martins
Contributor III
Contributor III
Author

Hi Olivier,

Supress Missing is already checked....

sergio0592
Specialist III
Specialist III

Maybe you can try with :

IF(RANK(TOTAL COUNT({<AÑO={$(=(vYearSelect))}>}DISTINCT ID_VISITA),4)>40,

COUNT({<AÑO={$(=(vYearSelect))},  NOMBRE_EMPRESA={"=COUNT({<AÑO={$(=(vYearSelect))}>} DISTINCT ID_VISITA>=1"}>}DISTINCT ID_VISITA))

wale_martins
Contributor III
Contributor III
Author

Hi Jean,

It doesn't work..... thank you for your time

sergio0592
Specialist III
Specialist III

Ok, and if you try:

IF(RANK(TOTAL COUNT({<AÑO={$(=(vYearSelect))}>}DISTINCT ID_VISITA),4)>40,

COUNT({<AÑO={$(=(vYearSelect))},  NOMBRE_EMPRESA={"=Not IsNull(COUNT({<AÑO={$(=(vYearSelect))}>} DISTINCT ID_VISITA)"}>}DISTINCT ID_VISITA))

sasiparupudi1
Master III
Master III

Try

IF(RANK(TOTAL COUNT({<AÑO={$(=(vYearSelect))}>}DISTINCT ID_VISITA),4)>40,

    COUNT({<ID_VISTA={'=RANK(TOTAL COUNT({<AÑO={$(=(vYearSelect))}>}DISTINCT ID_VISITA),4)>40'}AÑO={$(=(vYearSelect))}>}DISTINCT ID_VISITA))

wale_martins
Contributor III
Contributor III
Author

No way.... null values continue appearing and the rest turn into 0...

Thanks

wale_martins
Contributor III
Contributor III
Author

Hi Sasidhar,

There's something wrong in the expression...

Thanks for your time

sasiparupudi1
Master III
Master III

I missed a comma

IF(RANK(TOTAL COUNT({<AÑO={$(=(vYearSelect))}>}DISTINCT ID_VISITA),4)>40,

COUNT(

{<ID_VISTA={'=RANK(TOTAL COUNT({<AÑO={$(=(vYearSelect))}>}DISTINCT ID_VISITA),4)>40'},

AÑO={$(=(vYearSelect))}>}

DISTINCT ID_VISITA)

)

)