Quick Sight Filter Does Not Display New Event from UNION Query

Hi,

I created a custom query in Quick Sight, which is a union of several SELECT statements. I then built some visuals using the results of this query. Recently, I added a new SELECT statement to this union, as shown below:

select

dcon.nkcontratomosaic as Contrato

, dcli.nkcliente_razaosocial as Cliente

, flagprimeirofatvidacliente as Cliente_Novo

, flagPrimeiroFatProduto as Faturamento_Produto_Novo

, nomegrupopai as Grupo_Pai_Produto

, nomeproduto as Nome_Produto

, dvendc.nomeVendedorCarteira as Vendedor

, descrCanalMosaic as Canal

, count(f.nkitemcontratomosaic) as Total_Itens_Contrato

, CAST(NULL AS double) as Valor_Original

, SUM(f.valorMensal) AS Valor_Mensal

, CAST(NULL AS double) as Diferenca

, f.skdimdatainclusao as Data_Inclusao

, f.skdatacarenciamosaic as Data_Carencia

, f.skdimdatcancelamento as Data_Cancelamento

, skdimdataultimofaturamentodefinitivo as Data_Ultimo_Faturamento

, dcon.diafaturamento as Dia_Fatura

, f.diavencimento as Dia_Vencimento

, skdataprimeirofaturamento as Data_Evento

, 'Primeiro Faturamento em Agosto - flagsuspenso SIM' as Evento

from

"mosaic_gold"."fatcontrato" f

left join

"mosaic_gold"."dimcliente" dcli on dcli.skdimclientemosaic = f.skdimclientemosaic

left join

"mosaic_gold"."dimcontrato" dcon on dcon.skdimcontratomosaic = f.skdimcontratomosaic

left join

"mosaic_gold"."dimproduto" dpro on dpro.skdimprodutomosaic= f.skdimprodutomosaic

left join

"mosaic_gold"."dimTipoReceita" dtr on dtr.skDimTipoReceitaMosaic= f.skDimTipoReceitaMosaic

left join

"mosaic_gold"."dimVendedorCarteira" dvendc on dvendc.skDimVendedorCarteiraMosaic= f.skDimVendedorCarteiraMosaic

left join

"mosaic_gold"."dimcanal" dca on dca.nkCanalMosaic= dvendc.nkCanalMosaic

where

cast(skdataprimeirofaturamento as date) between date'2025-08-01' and date'2025-08-31'

and dtr.descrTipoReceita = 'Recorrente'

and flagFaturamentoSuspenso = 'SIM'

group by

dcon.nkcontratomosaic 

, dcli.nkcliente_razaosocial 

, flagprimeirofatvidacliente 

, flagPrimeiroFatProduto

, nomegrupopai 

, nomeproduto 

, dvendc.nomeVendedorCarteira

, descrCanalMosaic

, f.skdatacarenciamosaic 

, f.skdimdatcancelamento 

, f.skdimdatainclusao 

, skdimdataultimofaturamentodefinitivo 

, dcon.diafaturamento 

, f.diavencimento 

, skdataprimeirofaturamento 

, 'Primeiro Faturamento em Agosto - flagsuspenso SIM'

The issue I am facing is that in my existing visuals, where I have a filter applied on the Evento column, this newly created event — “Primeiro Faturamento em Agosto - flagsuspenso SIM” — does not appear in the filter options. As a result, I am unable to filter or create a visual based on this event.

I was able to create a calculated field using this event, which means the query itself is working correctly. However, it still does not show up in the filter list.

Could anyone help me identify the cause of this issue?

Hi there,

Is your dataset a Direct Query dataset (and not SPICE) ? If its direct query, has it been over 24 hours since you modified your query? The reason for the ask is that with direct query, the filter controls will update every 24 hours, meaning they will retain older values until they auto refresh again. To see if this is true, can you manually refresh your filter control to update the filter data? Click on the 3 dots next to the filter name and select Refresh.

If this is not the issue, then we can look into it a little deeper.

Thank you.

Hi @Asem,

It worked, thank you!

1 Like

Very glad that worked! let us know if you have any other questions.

-Asem.