Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mtabernad
Partner - Creator
Partner - Creator

Problem with expression

Hi,

I am trying to create a dynamic table with two dimensions: "year_month" and "Group client version" and one metric: 

Count({<Month={'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'},Type={'av'}>}distinct asset_nm&site_nm)

 

Could anyone tell me why the total value for May (3,555) for example (but it happens with all the months) does not match with the sum of  values for v12 (310) and v14 (3,249)?

 

capture3.png

 

Thank you in advance.

4 Replies
Kushal_Chawda

@mtabernad  try below

=if(Dimensionality()=1,

sum(aggr( Count({<Month={'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'},Type={'av'}>}distinct asset_nm&site_nm),yearmonth,[Group client version])),

Count({<Month={'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'},Type={'av'}>}distinct asset_nm&site_nm))

mtabernad
Partner - Creator
Partner - Creator
Author

Hi Kush,

Thank you for your comment. Still does not work and total sum shows 0:

 

capture4.png

Kushal_Chawda

Make sure that field names are correct in Aggr. Also how many dimensions are there in pivot?

mtabernad
Partner - Creator
Partner - Creator
Author

Initially there were 4 dimensions but I deleted 2 of them to make the problem easier. 

Dim1:

capture8.png

 

Dim2:

capture7.png

 

Metric:

capture6.png

Pivot table:

capture5.png