Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a dimension YEAR which shows values from 2008 to 2015. However the data is available only from 2011-2015. How do I not display those extra values.?
Hi Harshit,
I think your YEAR field is present in two different tables. Like,
Table1 has value 2008-2015
and Table2 has 2011-2015.
updateTable2 script,
YEAR,
YEAR as NewYear
From ......
and Show NewYear field in listbox.
At backend I've the field YEAR whose values are 2008,09,10,11,12,13,14,15 but there are not any corresponding values for the years 2008,09,10,11.....so I have these values displayed in listbox but since I've no data for it...I don't want to display them....what should I do?
So the solution is to not load those years.
Without knowing the data model and the script in which you currently load the years I can't give you an exact solution on how to avoid those years being loaded.
either use where condition in script,
or use if condition in list box.
I assume the other dates are coming from your calendar. When you add the calendar, you could do it with like this:
Calendar:
Left Keep (FactTable)
LOAD Date As FactDate
...
FROM Calendar.qvd (qvd);
Modify the logic and field/table names to suit your requirement.
This will prevent the loading of calendar data for dates that do not exist in your fact table. And you don't need to mess around with set expressions or conditional list boxes...
Yup! It works! Thanks ![]()