Hide the value from column if the min is 0

Hi guys , i need to hide an value from enum list if the last row that matching is equal zero “0”.

my app works in this way:

i have two columns [lote] and [anexo] with enum lists selecting values from another table:
valid if:

[lote] - SELECT(estoque[lote], ([tec] = "Johny Freitas"))
[anexo] - SELECT(estoque[anexo], [lote]=[_thisrow].[lote])

so i created a virtual column to show the min value from table estoque if anexo and lote is equal from the actual row.

to do this i use it:

virtual column [saldo] - MIN(SELECT (estoque[cartoes], And([lote] = [_THISROW].[lote],[anexo]= [_THISROW].[anexo]))
)

until here its working.

now i need to hide the value from column [anexo] if the value is equal 0
the values from table estoque is always decreasing.

May I ask are these list subtractions or just you point out to the column names?? Assuming they are not, below expression might fit for your [anexo] column:

SELECT(
	estoque[anexo],
	[lote]=[_thisrow].[lote]
) -
SELECT(
	estoque[anexo],
	AND(
		[tec] = "Johny Freitas",
		[lote]=[_thisrow].[lote],
		[cartoes] = 0
	)
)	
1 Like

Hi, it works tks!!!

but now i have the same problem with column [LOTE].
when an row reach “0” i need to hide too
so i do the same as anexo but it doesn’t works

i can solve it doing this:

SELECT(
estoque[lote],[acao]=“retirar”
) -
SELECT(
estoque[qtcartao],
AND(
[tecnico] = username(),
[acao] = “retirar”,
[qtcartao] = 0
)

1 Like