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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Showing Null Value

I have a straight table in which i have used Product list and Date as dimension. Product list has 5 Products out of which i have listed 4 products in the table. so i have given Calculated dimension as
Product List<>5
In expression i have written first expression has
sum
(Volume)
in second expression i have written
aggr
(sum({$<%PID={5}>} Volume),Date)
From the first expression i am getting Sum(Volume) for all the products in one column. but from the second expression i am getting volume of the 5th product but that is coming only in 1st row of the second column all the other rows are showing null values. I want to list the volume of 5th product in all the rows.
How it can be done ??
Labels (1)
1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try with total keyword

     Sum(TOTAL <Date>{$<%PID={5}>} Volume)

     Use this Expression without using calculated dimension

Celambarasan

View solution in original post

9 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     try with this

     $(=aggr(sum({$<%PID={5}>} Volume),Date)))

Celambarasan

Not applicable
Author

Hi Celambarasan,
$(=aggr(sum({$<%PID={5}>} TRx_Volume),Date))
I tried this. But its not working. Now all the values are comin Null
jagan
Partner - Champion III
Partner - Champion III

Hi,

Assign this to a variable

vTest = Sum(aggr(sum({$<[%PID]={5}>} TRx_Volume),Date))

Now use this variable in the expression as

=vTest

Now it displays all the cells with calculated value.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

i can not do that because for different dates different values are there but variable will store only one particular value at a time.

Not applicable
Author

The final table should look like this

Date  Product   sum(volume)  sum for product 5

1           1                  5.11                        10

1           2                  5.40                        10

1           3                  30.5                                                 10

1           4                  10.78                      10

2           1                   19.67                       20

2           2                   52.4                         20

2           3                  30.45                        20

2           4                  10.45                        20

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Check with this

    

$(=Sum(aggr(sum({$<%PID={5}>} Volume),Date))))

Celambarasan

Not applicable
Author

Hi Celambaran,
$(=Sum(aggr(sum({$<%PID={5}>} Volume),Date)))
This expression is giving value 0 in every row.
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try with total keyword

     Sum(TOTAL <Date>{$<%PID={5}>} Volume)

     Use this Expression without using calculated dimension

Celambarasan

Not applicable
Author

Thanks Celambarasan. It works I was struggling to get this correct since last 3 days. Thanks a lot