Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to show in a graph the sales of the current month by day, my expression is correct but the dimension does not adjust to the days of the current month. Could you help me?
For September the graph should arrive at 24 and show me the full month from 1 to 30.
Dimension:
Day(DATE)
Expression:
SUM({<[Date.autoCalendar.Year]={'$(vMaxYear)'},
[Date.autoCalendar.Month]={'$(vMaxMonth)'},[Date.autoCalendar.Day]={'<=$(vMaxDay)'},
Date=,[Date.autoCalendar.YearMonth]=>}SALES)
Thank you for your contribution Pablo, I was able to solve my prolbleama by making a UNION in the 3 tables I had, I had 3 different dates and with that I solved my problem.
Fala Mário, tudo bem ?
Neste caso você deve criar via script um calendário auxiliar onde fará a comparação se é o mês atual ..
exemplo:
CALENDARIO:
LOAD
Data as CHAVE_DATA,
Month(Data) as Mês,
Year(Data) as Ano,
Date(MonthStart(Data), 'MMM/YYYY') as MêsAno,
Year(Today())-Year(Data) as YearsAgo,
If(Makedate(Year(Today()), Month(Data), day(Data))<=Today(), 1, 0) as InYTD;
LOAD
date('$(vMenorData)' + Recno() - 1) as Data
AutoGenerate ('$(vMaiorData)' - '$(vMenorData)' + 1);
Assim você garante a comparação se é o mês atual e se sim qual o dia vigente.
ai na aplicação você faz um set analysis para caso não tenha nenhuma seleção de filtros garantir o MÊS ATUAL com dados ate o DIA ATUAL exemplo hoje teria setembro do dia 1 ate 25.
if([Ano] = vAnoAtual or GetSelectedCount (Ano])= 0,
Count( { $< [InYTD]={1}, [YearsAgo]={0} > } [SALES] ),
Count( { $< [Ano]= {$(=Max([Ano]))} > } [SALES] ))
Não sei se deu para pegar a essência ?
Thank you for your contribution Pablo, I was able to solve my prolbleama by making a UNION in the 3 tables I had, I had 3 different dates and with that I solved my problem.