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: 
MEDHA07
Contributor III
Contributor III

how to show zero values seperatley when we use sum in measure expression

Hi All,

I need to get measure values separate row when it has zero.

first 3 dimension are having same values.The 4th dimension i am not loading that filed in qlik but i mentioned in  sql query group by when i did sum calculation in backend itself.

In qlik data model it is giving two rows without subjid filed as expected.even if we wont load that field.

when i add the measure 1 in table getting one record ,if i add second measure that also giving one record.but i need separately records for two values one row for 1200 and second for zero if i add them in measure in the table.

i can show them two seperate rows when i add these two measures in dimenssions.

but user need the total sum in the table so if i add them in dimenssion not getting the total.

if i add them i measure sum(measure) is aggreating 1200+0 =1200 is giving one row result

 

expecting results if i add measure fields in measures in the table.

 

No LocationNo bldgno Measure 1 Measure 2
136 1 1 9867 1200
136 1 1 9867 0
No LocationNo bldgno subjid Measure 1 Measure 2
136 1 1 123 9867 1200
136 1 1 124 9867 0
Labels (2)
1 Solution

Accepted Solutions
MEDHA07
Contributor III
Contributor III
Author

Hi All,

 

I have tried with dual in my No field  dimension and it is giving two rows.

 

dual(No,SubjdimID)

in dimension values its giving results with No values and getting separate  row for zeros

View solution in original post

3 Replies
vinieme12
Champion III
Champion III

just add a dimension to the chart that identifies these two rows uniquely , which appears to be subjid

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
MEDHA07
Contributor III
Contributor III
Author

Hi,

yes it is coming when i added the dimension. but user don't want to add that dimension in table.

without adding that dimension we should get the two rows.

MEDHA07
Contributor III
Contributor III
Author

Hi All,

 

I have tried with dual in my No field  dimension and it is giving two rows.

 

dual(No,SubjdimID)

in dimension values its giving results with No values and getting separate  row for zeros