Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Report (display null based on some condition when the selections come from Inline Load)

Requirement:

Change the display in reports such that, if some condition is satisfied, it should display null in Xyz field.

The fields those are given as selection in UI, are coming from Inline Load in UI script

LOAD * INLINE [

%AdhocAccountDim,%AdhocAccountDimReal

Abc,Abc

Xyz,Xyz]

where %AdhocAccountDimReal -> refer to actual field Abc and Xyz in database.

%AdhocAccountDim -> Abc, Xyz  present as selections on UI.

·         In the report Xyz is selected as dimension with enable condition as

(getselectedcount(%AdhocAccountDim)>0 and max(aggr(if(%AdhocAccountDim='Xyz',1),%AdhocAccountDim))=1) 

Issue : In Approach 1:

As soon as I put condition in existing 'Xyz' Dim in report, for creating a calculated dimension like :

=if(FLAG='Y',null(),Xyz)

The results in report are not displaying properly, the results for Flag = N is displaying fine but for Flag = Y getting something as sum( Yvalues) in expressions.

Issue : Approach 2:

If I create a new calculated dimension as Xyz New

=if(FLAG='Y',null(),Xyz) with same enable condition

(getselectedcount(%AdhocAccountDim)>0 and max(aggr(if(%AdhocAccountDim='Xyz',1),%AdhocAccountDim))=1) 

and adding this in report, the result is only getting displayed properly if the original Xyz is also present along with new Xyz

Xyz(Original)

Xyz(new calculated dim)

Flag

Values

a

null

Y

1

b

b

N

2

c

null

Y

1

d

null

Y

3

e

d

N

1

f

null

Y

2

as soon as I remove the Xyz(original)

Xyz(new calculated dim)

Flag

Values

b

N

2

d

N

1

null

Y

7 (sum of all Y values)

Expected Output :

Xyz(new calculated dim)

Flag

Values

null

Y

1

b

N

2

null

Y

1

null

Y

3

d

N

1

null

Y

2

Please provide some input.

Thanks !!

1 Reply
qlikpahadi07
Specialist
Specialist

can you attach a Sample QVW