Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I have a dashboard which is reloaded daily, sourcing from many different datasets.
Especially one dataset is really massive and refreshed anyway just monthly.
Therefore I am looking for ways to AVOID to reload this dataset, unless we are on the first friday of the month (when this dataset is refreshed).
So far I just came to this point
if(Day(today()))<=7 then
Demand:
CrossTable(Month,Demand,3)
LOAD
purgechar(PROD,CHR(32)) as SKU,
the problem I am having is that the script does not go any further afterwards.
So how can I have both the script:
- check if we are in the FIRST Friday of the month
- when we are not, skip the subsequent LOAD section, but still continue in processing the script?
I have the feeling I should be reaching what I want by using if then or if else, but I cannot really make something out of it...
Thank you very much
if day(Today()) <= 7 and WeekDay(Today()) = 'fri' then
// Load your table
end if
if day(Today()) <= 7 and WeekDay(Today()) = 'fri' then
// Load your table
end if
hi
try this
if day(Today()) <= 7 and WeekDay(Today()) = 'Fri'
then
Wow, that easy!
I was drowning in an inch of water, thanks!
just to point out, I think that by default the parameters set at the beginning of the script have the days written as Mon, Tue etc. and not mon, tue.
so for your script to work out, "fri" needs to be changed to "Fri"
In my case, would be 'sex', because my QV is in Portuguese
actually, I badly formulated my question.
By doing so, the data will not visible in the dashboard for the whole month, besides the first friday.
Indeed, what I would like to achieve is that the data is not reloaded throughout the month, as it is the same; but it is indeed kept and visible within the dashboard!