Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a calculation saved in a variable. I am using the same in my expression
if($(vFormula)<5, $(vFormula))
The expression column shows numbers less than 5 but also shows empty rows for the dimension. I checked Suppress Zero-Values for the expression and Suppress when value is null for the dimension. It still does not work.
How to remove the empty rows for this expression?
if the dimension results in a value for your other expression then the row becomes valid and you WILL get the null under the <5 column. setting suppress missing will not do anything as that other column is valid. you need to decide what you want to do for this scenario, if you dont care about that other expression then you can (and this without seeing the complete picture) add an if statement in the other expression
=if(sum(amount)>0, YOUR EXPRESSION HERE)
this will basically null your other expression if the sum is 0
a simple approach:
create 3 expressions:
=if(sum(amount)<5,sum(amount))
=if(sum(amount)>=5 and sum(amount)<10, sum(amount))
=if(sum(amount)>10,sum(amount))
all of them would have the same text color expression :
=if(sum(amount)<5, red(),
if(sum(amount)<10, green(), yellow()
)
)
this will show all 3 expressions but some will be null depending on the total, then create a button that will either select a field (with colors) or 3 buttons that set a color variable.
then in each express add a condition to show the expression is field is selected or a variable is set
The expression column shows numbers less than 5 etc based on the conditions but it also shows empty rows for the dimension. I checked Suppress Zero-Values for the expression and Suppress when value is null for the dimension. It still does not work.
the expression
=if(sum(amount)<5,sum(amount))
will result in 0 if amount is null. suppressing 0 removes it. is it possible you have other expressions that influence the visualization? add a QVW so its easier to check
I have other expressions in the same table. Guess they are affecting this logic. I need those expressions and this conditional ones as well.
if the dimension results in a value for your other expression then the row becomes valid and you WILL get the null under the <5 column. setting suppress missing will not do anything as that other column is valid. you need to decide what you want to do for this scenario, if you dont care about that other expression then you can (and this without seeing the complete picture) add an if statement in the other expression
=if(sum(amount)>0, YOUR EXPRESSION HERE)
this will basically null your other expression if the sum is 0