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: 
Ribeiro
Specialist
Specialist

the program values for resale. How to hide Customers without sales in a variable

In the image below, there is a Client Code that is showing the variable vFinanceiro. because I need to create a set analysis that doesn't come white.

2020-12-05_08-16-53.jpg

The result I need should look like this.🤔

2020-12-05_08-26-07.jpg

Neves
2 Solutions

Accepted Solutions
rubenmarin

Hi @Ribeiro, one option is to add an if to each expression to check if(SalesExpression<>0, ThisColumnExpression)

Another option is a calculated dimension that does the check: Aggr(if(SalesExpression<>0, DimensionFieldName), DimensionFieldName)

View solution in original post

rubenmarin

Hi, the aggr option was to use as conditional dimension, instead of COD.

The version to reduce using expressions need to add the check in all the expressions, becasuse if any espression has a value to show, it will show the dimension, ie:

if ( Sum({$<[EFETIVADA]={'1'},[CANCELADA]={'0'},[EVENDA]={'1'},
[CODIGOTIPOMOVIMENTO]={'20','99','111','116','117'},[TIPOSAIDAENTRADA]={'S'}>}VALORTOTAL)
<> 0, VFinanceiro)

and for VALORTOTAL it should be:

if ( Sum({$<[EFETIVADA]={'1'},[CANCELADA]={'0'},[EVENDA]={'1'},
[CODIGOTIPOMOVIMENTO]={'20','99','111','116','117'},[TIPOSAIDAENTRADA]={'S'}>}VALORTOTAL)
<> 0, Sum({$<[EFETIVADA]={'1'},[CANCELADA]={'0'},[EVENDA]={'1'},
[CODIGOTIPOMOVIMENTO]={'20','99','111','116','117'},[TIPOSAIDAENTRADA]={'S'}>}VALORTOTAL))

If you only set "VALORTOTAL" as the true part of the 'if' it returns null because it has different VALORTOTAL values

View solution in original post

4 Replies
Kushal_Chawda

@Ribeiro  your qvw has section access. please remove and attach the new one

rubenmarin

Hi @Ribeiro, one option is to add an if to each expression to check if(SalesExpression<>0, ThisColumnExpression)

Another option is a calculated dimension that does the check: Aggr(if(SalesExpression<>0, DimensionFieldName), DimensionFieldName)

Ribeiro
Specialist
Specialist
Author

Aggr (if ( Sum({$<[EFETIVADA]={'1'},[CANCELADA]={'0'},[EVENDA]={'1'},
[CODIGOTIPOMOVIMENTO]={'20','99','111','116','117'},[TIPOSAIDAENTRADA]={'S'}>}VALORTOTAL)
<> 0, VALORTOTAL), CODIGOPESSOA)

did not work🤔

 

Any suggestion.

empty🤣

2020-12-05_15-18-31.jpg

Neves
rubenmarin

Hi, the aggr option was to use as conditional dimension, instead of COD.

The version to reduce using expressions need to add the check in all the expressions, becasuse if any espression has a value to show, it will show the dimension, ie:

if ( Sum({$<[EFETIVADA]={'1'},[CANCELADA]={'0'},[EVENDA]={'1'},
[CODIGOTIPOMOVIMENTO]={'20','99','111','116','117'},[TIPOSAIDAENTRADA]={'S'}>}VALORTOTAL)
<> 0, VFinanceiro)

and for VALORTOTAL it should be:

if ( Sum({$<[EFETIVADA]={'1'},[CANCELADA]={'0'},[EVENDA]={'1'},
[CODIGOTIPOMOVIMENTO]={'20','99','111','116','117'},[TIPOSAIDAENTRADA]={'S'}>}VALORTOTAL)
<> 0, Sum({$<[EFETIVADA]={'1'},[CANCELADA]={'0'},[EVENDA]={'1'},
[CODIGOTIPOMOVIMENTO]={'20','99','111','116','117'},[TIPOSAIDAENTRADA]={'S'}>}VALORTOTAL))

If you only set "VALORTOTAL" as the true part of the 'if' it returns null because it has different VALORTOTAL values