Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
JMAROUF
Creator II
Creator II

show only dimensions which have a not null value of measure

Hi,

can anyone tell me how to show only dimensions which have a not null value in measutre:

ex:

ID MEASURE
046B 5000
8998 4000
9FFF 5000
G998 0
G100 0

 

i dont want to display  G998 and G100 because they have a null value, the formula is:

sum({<invest={"*"}-{'tiers'}>} invest_amount)

Any help please?

Labels (2)
8 Replies
abhijitnalekar
Specialist II
Specialist II

Hi @JMAROUF ,

Please uncheck the below checkbox from the property of dimension ID 

 

abhijitnalekar_0-1637862985528.png

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
JMAROUF
Creator II
Creator II
Author

Thank you @abhijitnalekar ,

even i uncheck it, it shows nul values, i think this case concerns the dimension nul values not measures.

Regards.

MEDHA07
Contributor III
Contributor III

Hi,

Try this.

HarishM07_1-1637944615210.png

 

=sum({<MEASURE={">0"}>}MEASURE)

 

HarishM07_0-1637944590569.png

 

JMAROUF
Creator II
Creator II
Author

Hi @MEDHA07 ,

thank you for the answer, the 0 is the values of the measure after executing formula, i can't guess this result before setitng up the formula.

Regards;

MEDHA07
Contributor III
Contributor III

The formula will work even if you have nulls or blanks or zeros in your data set.based on above set analysi condition it will calculate only not null values while doing sum.

JMAROUF
Creator II
Creator II
Author

yes, but my goal is not to show nul result after calculating (not before), for example if i have a 0 in a sum() operation i don't want to show all the row including dimension value,

e.g:

DATA

ID Value_1 Value_2
046B 5000 -5000
8998 4000 1000
9FFF 5000 0
G998 0 0
G100 0 10

 

Table chart:

ID

sum(Value_1

+Value_2)

046B 0
8998 5000
9FFF 5000
G998 0
G100 10

 

desired result

ID

sum(Value_1

+Value_2)

8998 5000
9FFF 5000
G100 10

 

046B and G998 shouldn't appear.

 

MEDHA07
Contributor III
Contributor III


@JMAROUF wrote:

yes, but my goal is not to show nul result after calculating (not before), for example if i have a 0 in a sum() operation i don't want to show all the row including dimension value,

e.g:

DATA

ID Value_1 Value_2
046B 5000 -5000
8998 4000 1000
9FFF 5000 0
G998 0 0
G100 0 10

 

Table chart:

ID

sum(Value_1

+Value_2)

046B 0
8998 5000
9FFF 5000
G998 0
G100 10

 

desired result

ID

sum(Value_1

+Value_2)

8998 5000
9FFF 5000
G100 10

 

046B and G998 shouldn't appear.

 



@JMAROUF wrote:

yes, but my goal is not to show nul result after calculating (not before), for example if i have a 0 in a sum() operation i don't want to show all the row including dimension value,

e.g:

DATA

ID Value_1 Value_2
046B 5000 -5000
8998 4000 1000
9FFF 5000 0
G998 0 0
G100 0 10

 

Table chart:

ID

sum(Value_1

+Value_2)

046B 0
8998 5000
9FFF 5000
G998 0
G100 10

 

desired result

ID

sum(Value_1

+Value_2)

8998 5000
9FFF 5000
G100 10

 

046B and G998 shouldn't appear.

 




Backend itself you can do addition for value and value 2 using preceding load or resident load store the values into new field.

Load your data and in measure expression give the s

Same condition which i refered earlier.

T1:

load*,

Sum(value1)+sum(value2) as MS_FLAG;

Load

Dim1,

Dim2,

Value1,

Value2

From.....;

JMAROUF
Creator II
Creator II
Author

I am in a complicated star schema whit many filters, the formula above is just an example, i thought that i can hide dimension basing on the value measure which is my goal, for the backend treatment we aren't authorised to do such formulas, we have a data warehouse and we should just load dimensions and facts and apply  filters and formulas in the  front end script for some business reasons.

Regards.