Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have 2 tables:
Table1: Field 1 ----> Date
Field 2 ----> Sales
Table1: Field 1----> EventName
Field 2 ----> DateFromCY
Field 3 ----> DateToCY
I create 2 Variable :
vStartDateCY : =Date(DateFromCY)
vEndDateCY : =Date(DateToCY)
I want Sales for event period.
expression: Sum({<Date={">=$(vStartDateCY)<=$(vEndDateCY)"}>}Sales)
Works fine when i select one event.
When Clear selection gives me total sales. 😞
I want display Sales per Event.
Thanks
Whenever you do dollar expansions in a set expression you should consider the value as it is a variable defined outside of your chart. $(vStartDateCY) will have the same value for all rows in your chart and in your case it will probably be null as I assume you have more than one DateFromCY value in your selection.
Have you considered using IntervalMatch for modelling your data?
hi vegar,
thank you for your response,
so do you have a solution for that ?
Try to use interval match.
Sales:
LOAD Date, Sales
FROM SALES;
Event:
LOAD DateFromCY, DateToCY, EventName
FROM EVENT;
Inner Join IntervalMatch ( Date )
LOAD DateFromCY, DateToCY
Resident Event;
thank you. it works
but i have an other issue 😞
Event:
LOAD
EventName , DateFromCY, DateToCY,
EventNameComp, DateFromComp, DateToComp
FROM Event;
Date:
LOAD Date, Sales
FROM Date;
Inner Join IntervalMatch ( Date)
LOAD
DateFromComp,
DateToComp
Resident Event;
What about the Event comparable ???