Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I'm using the master calendar in my script.
And I used that to display specific value based on weekyear (weeknumber and year)
What i want to do is to put in Green the most recent bar in the chart. The most recent one is 20.2018 and i want it to be in different color for comparison aspect.
I know i have to go to background in the expression view
But as i'm a newcomer for qlikview i don't know the right formula to put in order to have the bar chart in blue for the latest (most recent week).
As I previously said I have a master calendar in my script
MasterCalendar:
Load
TempDate as Created,
week(TempDate) As Week,
Year(TempDate) As Year,
Month(TempDate) As Month,
Day(TempDate) As Day,
YeartoDate(TempDate)*-1 as CurYTDFlag,
YeartoDate(TempDate,-1)*-1 as LastYTDFlag,
inyear(TempDate, Monthstart($(varMaxDate)),-1) as RC12,
date(monthstart(TempDate), 'MMM-YYYY') as MonthYear,
ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,
Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as WeekYear,
WeekDay(TempDate) as WeekDay
And the field of the bar chart (which represent the expression i used in the form (sum(LossBU)) is
Anyone can help ?
Thank You
if the variable in the script is not working, delete it.
You need to get the expression right. Use a text box to make sure you have everything correct in the set analysis part. Try adding an = after dollar: $(=vMax....
if(WeekYear = max(WeekYear),lightgreen())
It doesn't work unfortunately.
DOes it have to do with the fact that almost every bar chart of mine have a empty space like in the image below
ANd on the other hand, it (kind of) work for another chart. Except that it doesn' take into account the last month
Does this struggle have to do with the master calendar ?
Thank you in advance
Can you post a sample version of the app?
Try using Maxstring like below,
if(only({1}WeekYear) = maxstring(WeekYear),lightgreen())
I just included {1} to ignore all report selections.
Thanks,
Shan S
Once you done that which provide by mwoolf you need to do "Suppress When Value is Null" for that dimension
THank you for trying but unfortunately it's not working
Everything turn green whereas it's not really what i want.
Here is my master calendar, just in case it can help:
"
QuartersMap:
MAPPING LOAD
rowno() as Month,
'Q' & Ceil (rowno()/3) as Quarter
AUTOGENERATE (12);
Temp:
Load
min(Created) as minDate,
max(Created) as maxDate
Resident MyTable1;
Let varMinDate = Num(Peek('minDate', 0, 'Temp'));
Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));
DROP Table Temp;
TempCalendar:
LOAD
$(varMinDate) + Iterno()-1 As Num,
Date($(varMinDate) + IterNo() - 1) as TempDate
AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);
MasterCalendar:
Load
TempDate as Created,
week(TempDate) As Week,
Year(TempDate) As Year,
Month(TempDate) As Month,
Day(TempDate) As Day,
YeartoDate(TempDate)*-1 as CurYTDFlag,
YeartoDate(TempDate,-1)*-1 as LastYTDFlag,
inyear(TempDate, Monthstart($(varMaxDate)),-1) as RC12,
date(monthstart(TempDate), 'MMM-YYYY') as MonthYear,
ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,
Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as WeekYear,
WeekDay(TempDate) as WeekDay
Resident TempCalendar
Order By TempDate ASC;
Drop Table TempCalendar; "
Thank you for your help
I cannot do suppres when value is null because i also want to display the month where there are no datas.
But THis is not that important.
What i can't figure out is why the formula doesn't work.
Does it have to do with the master calendar ?
Can you attach application?
Here are the files i use.
I have qlikview personnal edition by the way. SO I won't be able to use the file once modify...