Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Sirs
I would have a straight chart with Month as dimension that shows the situation of sales at a selected number of day of the various months of this year compared of the same number of the day and month of the past year. At this stage I have this chart, that shows the comparison of months not up to the day 22 but up to the end of the month. Only last month is correct, because it is not completed.
I have used this two expressions:
=SUM({<[Year Ord.]={'$(VMaxYearOrd)'},[Date ord.]={'<=$(VMaxDataOrd.)'},[Month Ord.]=,[Day Ord.]=,MonthYearOrd.=>}Value)
and
=SUM({<[Year Ord.]={'$(VPriorYearOrd.)'},[Month Ord.]=,[Day Ord.]=,[Date ord.]={'<=$(VPriorYearDate)'},MonthYearOrd=>}Importo)
Thank you for your help.
BR
Andrea
Try this:
current year:
SUM({<[Year Ord.]={'$(VMaxYearOrd)'},[Date ord.]=,[Month Ord.]=,[Day Ord.]={"<=$(=max([Day Ord.]))"}, MonthYearOrd.=>}Value)
last year:
SUM({<[Year Ord.]={'$(VPriorYearOrd)'},[Date ord.]=,[Month Ord.]=,[Day Ord.]={"<=$(=max([Day Ord.]))"}, MonthYearOrd.=>}Value)
Hope this helps
Regards!
try replacing:
[Day Ord.]= with [Day Ord.]={"<=$(=day(today()))"}
Hi,
In script arrive a new column for day like below
Now use below expression
=SUM({<[Year Ord.]={'$(VPriorYearOrd.)'},[Month Ord.]=,[Day Ord.]={"<=$(=day(today()))"},
[Date ord.]={'<=$(VPriorYearDate)'},MonthYearOrd=>}Importo)
or if this not works then try below
LOAD
*,
Day(DateFieldName) AS Day
FROM DataSource;
=SUM({<[Year Ord.]={'$(=VPriorYearOrd.)'},[Month Ord.]=,[Day Ord.]=, Day={'<=$(=Day(Today()))'},
[Date ord.]={'<=$(=VPriorYearDate)'},MonthYearOrd=>}Importo)
Hope this helps you.
Regards,
Jagan.
Dear Alberto,
many thanks for your helpful answer.
How can I change the formula with a Varabile?
For example from [Day Ord.]={"<=$(=day(today()))"} to [Day Ord.]={"<=$(=day(VMaxDataOrd.)"}
Best regards
[Day Ord.]={"<=$(=day($(VMaxDataOrd.)))"}
Thank you Alberto!
I have found another solution, I have created a new variabile for the selection of the day.
best regards
Andrea