Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
this is my first question I'm posting here, I hope I don't make to many mistakes.
In my script, I LOAD data from a qvd, that another app programed by somebody else made from multiple csv. That works pretty good, but now I tried to put a where-clause in my load statement, in order to only load real data and not the fake test data. To do so, I say where(yearmonth>201699)
According to my understanding, this should give me all the data from the year 2017 and onwards. However I discovered, that the year 2016 still is in my Dashboards, it just doesn't contain data anymore. I had the same result when trying to exclude 2017 the same way, that year contains real data. Since the point of this is reduce potential misunderstandings for people who use my app and don't have any knowledge of the programming, this doesn't rly get me there.
What did I do wrong or is there another possibility to completely exclude all data from before 2017?
Thanks in advance and greetings from Germany!
How about this?
name:
LOAD yearmonth
year('01.'&right(yearmonth,2)&'.'&left(yearmonth, 4)) as year,
month('01.'&right(yearmonth,2)&'.'&left(yearmonth, 4)) as month,
data
FROM [lib://QVD/Datasource\name2.qvd] (qvd)
Where Left(yearmonth, 4) > 2017;
What is the exact script you are using?
Beside filtering your fact-data you might also need to filter your dimension-data (calendar).
- Marcus
name:
LOAD
yearmonth
year('01.'&right(yearmonth,2)&'.'&left(yearmonth, 4)) as year,
month('01.'&right(yearmonth,2)&'.'&left(yearmonth, 4)) as month,
data
FROM [lib://QVD/Datasource\name2.qvd]
(qvd);
Thats the (simplified) script right now.
I haven't had the time yet to get into the calendar-stuff, so everything there is in default mode right now. Would you mind elaborating?
How about this?
name:
LOAD yearmonth
year('01.'&right(yearmonth,2)&'.'&left(yearmonth, 4)) as year,
month('01.'&right(yearmonth,2)&'.'&left(yearmonth, 4)) as month,
data
FROM [lib://QVD/Datasource\name2.qvd] (qvd)
Where Left(yearmonth, 4) > 2017;