Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a large set of project data with project event START DATES and END DATES. I want a table to only show the activity/events within the current week. What would be the expressions to capture this view?
Hi,
Try like this
=Sum({<StartDate={'>=$(=WeekStart(Today()))<=$(=Today())'}>} MeasureName)
Hope this helps you.
Regards,
Jagan.
Hi,
Another option is to create a flag attribute in the table in your load script which would equal to 1 for current week:
[
YouNewTable:
LOAD *,
if(StartDate>=WeekStart(Today()), 1, 0) as CurrentWeek
FROM YourTable;
DROP YouTable;
]
Best regards,
Maxim
Thanks Jagan.
Works great.
1. How would alter this to only show current day activity vs. the entire week?
2. How would I exclude specific data elements from a table?
Thanks for the help. Obviously, my skills are rudimentary at this stage.
Robert Lakin
Hi,
For Current date use below expression
=Sum({<StartDate={'$(=Today())'}>} MeasureName)
You can exclude specific elements by using -=
Sum({<Region-={'Asia'}>} Sales) - This will exclude Asia from the Region.
HOpe this helps you.
Regards,
Jagan.
How would I display the rolling 7 days? Current day + 7 future days only of data?
=Sum({<StartDate={'>=$(=Date(Max(StartDate)-6))<=$(=Max(StartDate))'}>} MeasureName)
Make sure that StartDate and Today() are in same format.
Check this link for similar type of expressions for different scenarios.
Also if you got Answer close this thread by giving Correct and Helpful answers to the posts which helps you in getting the answers.
This helps other in getting the answers easily.
Regards,
Jagan.