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

Problem with calculated dimension (if and Sum)

Hello,

I have a problem when a tried to create a dimension calculated.

=if(Sum([Qtde Vendida])=0,'Sem Movimento','Com Movimento')

 

Does anyone know what happens in this case?

 

1 Solution

Accepted Solutions
bruno_silva100
Contributor III
Contributor III
Author

Tks Rob and Nicu1966, but I changed the dimension and it worked. For this case i didn't have the paremeter for to use aggr

View solution in original post

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Are  you are trying to create a single or multiple dimension value. If multiple,  you must specify what dimension you are summing over using aggr. For example, by Month -- to generate 'Sem Movimento'  or 'Com Movimento' for each Month:

aggr( if(Sum([Qtde Vendida])=0,'Sem Movimento','Com Movimento'), Month)

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

nicu1996
Contributor III
Contributor III

If you want to use an aggregation function, you have to add your expression as a measure (Then, choose None as Totals function).

Screenshot_758.png

 

As a Field/Dimension, it is not working fine.

Screenshot_759.png

bruno_silva100
Contributor III
Contributor III
Author

Tks Rob and Nicu1966, but I changed the dimension and it worked. For this case i didn't have the paremeter for to use aggr