I'm doing a PBI query through a View. However, no matter how I modify the date format, it does not.
The View is below:
select
NROREPRESENTANTE AS CodRepresentante,
nroempresa,
seqcliente,
skcategoria,
count(distinct seqnf) as "Clientes Total",
sum(qtdoperacao) as "Produtos Vendidos",
sum(vlroperacao) as "Venda Total",
sum(vlrctobruto) as "Custo Bruto",
sum(vlroperacao*ind_promocao) as VLR_PROMOCAO,
TO_char(DATA, 'DD/MON/YYYY') as DOPER
from dwv_venda
where DATA between to_date('01/JAN/2018', 'DD/MON/YYYY') and
TO_DATE('31/DEZ/2018', 'DD/MON/YYYY')
and acmcompravenda = 'S'
group by data, NROREPRESENTANTE, NROEMPRESA, seqcliente, skcategoria
order by data, NROREPRESENTANTE, NROEMPRESA, seqcliente, skcategoria
I've tried To_date
too, in several ways. I already looked at the region in PBI, it is in Brazil. I do not know what I'm doing anymore, because I need to determine the date range to narrow the lines that the PBI will consult.