Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

show sheet condition

Dear Team,

I have set a show sheet condition as below. Meaning when the variable hit the value and sheet will show. Everythig is working fine,.

setting.png

Below is my report view. But my question is, below is my view, it actually is a straight table. I want to know how do i put a condition if straight table contains no data then hide the sheet.

Untitled.png

13 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

You need an expression that calculates the number of rows, and compare that expression to zero in the Properties | Layout | Show conditional box. For example

     Count(DISTINCT dimension) > 0

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
effinty2112
Master
Master

Hi Chee,

If you have one expression and N dims in your straight table then try:

Count(Aggr(Expr1,Dim1,Dim2, ..., DimN)) >0 as the show condition for the sheet.

If you have more than one expression, say M then try

Max(

Count(Aggr(Expr1,Dim1,Dim2, ..., DimN)) ,

Count(Aggr(Expr2,Dim1,Dim2, ..., DimN)) ,

.

.

.

Count(Aggr(ExprM,Dim1,Dim2, ..., DimN))

) >0


I've never did this before and so haven't checked it so if you try it please let me know how it goes.


Cheers


Andrew

antoniotiman
Master III
Master III

Conditional :

vShow=1 and Sum(Aggr(1,Employee,StartTime,Job,..)) > 0

Regards,

Antonio

Not applicable
Author

what if my page of data is chart instead of straight table?

antoniotiman
Master III
Master III

You wrote

' if straight table contains no data then hide the sheet.'

Employee,StartTime,.. are Dimensions of Your Straight Table

Not applicable
Author

Hi Antonio,

what if my chart dimesion is calculated dimension instead of fixed field. for example

If(VS='VSR' and No=2, JOB_NO )

antoniotiman
Master III
Master III

Try

Sum{<VS={'VSR'},No={2}>} Aggr(1,JOB_NO,Dim,..)) > 0

or

Sum(Aggr(If(VS='VSR' and No=2, 1,0),JOB_NO,Dim,...)) > 0

Not applicable
Author

what is the DIM,..... after JOB_NO??

antoniotiman
Master III
Master III

Other Dimensions (Employee,StartTime,..)