Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
`Hi,
I have a diagram with HR data that can display very different data:
- About half of it is data that I can only display on a specific "cutoff day", so the dimension for that is the end of a month
- The other half is dynamic data, so the dimension for that is the month
The problem now is that the month in QlikView has three letters => the date of the last_day_of_a_month is spelt out and has ten - the dimension_points are diagonal
=> The dimension "last_day_of_month" takes up a lot more space than the dimension "month"
=> When switching the dimension, the diagram seems to "hop"
I would like to change that to get a more "quiet" look into my diagram. I would thus need to have that dimension "last_date_of_month" displayed as a three-letter-monthname like the other one.
Is there a way to do that?
Thanks a lot!
Best regards,
DataNibbler
Not sure I understand your question, but wouldn't Date(last_day_of_a_month, 'MM') work ?
Hi Keith000,
I tried with MONTH(Monatsende)
[my field is named "Monatsende"]
<=> Unfortunately, that doesn't seem to work: The diagram just displays a "-" when I have the formula (with an "=" of course) in that "description" field on the "dimension" tab of the properties dialog.
Best regards,
DataNibbler
You are using this as label? I think you should use
=Month(Monatsende)
as a calculated dimension instead.
Hi swuehl,
no, that's precisely what I don't want - I have the month, so there would be no point in calculating the end_of_the_month if I wanted the month 😉
No, the data is discrete - I can display it only for one specific cutoff_day, not for a period - I chose the end of a month as a good cutoff_day for it, so my dimension has to be the end_of_a_month which I calculated in the script - the field "Monatsende" is the calculated end of every month.
I merely want the diagram to display something different from what the calculation uses.
I don't know if that is possible at all except by again using a lot of free_text_boxes to cover the original dimension_points - which would do no good - the goal is gaining space and getting a quieter appearance by using the three-letter-monthnames.
Best regards,
DataNibbler
Fredrich,
could you draw a mock-up of what you are trying to accomplish, because your explanation is a bit confusing. I was thinking along the same line as swuehl, which is formatting your dimensions in a certain way, but that seems to be wrong in your mind. please draft up what you'd like to see.
thanks!
Oleg
Hi Oleg,
what I want is actually very simple, maybe I have explained it in too complicated a way. I'll break it down, leaving aside all advanced matters:
- I have a diagram using one dimension (the other one is all right, forget it)
- That dimension is currently the last_day_of_the_month, so it reads "31.01.2013, 28.02.2013 etc."
- The dimension_values are diagonal (as are the month_names of the "other half", that's not right in the presentation)
=> They take up a lot of space, reducing the space left for the actual data (and it makes the diagram "hop" when switching from the dimension "month" to the dimension "last_day_of_month", but never mind that for now)
<=> The dimension has to be the last_day_of_the_month since I can display the data only for a specific day, not for a month.
=> I would like to (keep the dimension as it is and) have the dimension displayed in another format: 'MMM' instead of 'DD.MM.YYYY' - but to change only the display, not the dimension of the chart itself, that has to stay the same.
I will attach a small presentation (just two slides, what I have and what I want).
Thanks a lot!
Best regards,
DataNibbler
Understood.
Well, it was actually you who suggested the Month() function in the first place, and I still think that this (or using date() formatting function) will solve your issue, when used as calculated dimension (or properly created in script).
Have you actually tried to use either one of the already suggested solutions?
Besides this, I would suggest that you create a small sample application that demonstrates your issue, I assume there might be something more complex hidden, that I haven't understood when reading your explanations.
Hi Friedrich,
What I understood from the presentation is if the value in your dimension is 1/1/2013, you want to display "Jan" & so on with passing months. Hope this is what you want.
Considering this and the point that you don't want to change the dimension but only the way it is displayed, can't you just add Month() to the dimension field.
For Eg. if your dimension field is "last_date_of_month" then you can use Month(last_date_of_Month) or Date(last_date_of_visit,'MMM')as a calculated dimension.
Another option would be to calculate Month(last_date_of_month) in the script itself (if it is feasible) and then use it as a dimension.
If this does not help, can you please post the definition/calculation of the dimension "last_date_of_month"?
Regards,
Shyamal
Unsure if I've understood you correctly but you could create sort of translation table and name the new translation dimension Month_2. Try this code:
let StartDate = num(date('2013-01-01'));
let EndDate = num(date('2013-12-31'));
Monatsende_to_month:
LOAD if(DATE=daystart(MonthEnd(DATE)), DATE) as Monatsende,
if(DATE=daystart(MonthEnd(DATE)), Month(DATE)) as Month_2;
Load
Date($(StartDate)+(Iterno()-1),'YYYY-MM-DD') as DATE
// Date, to be used as key feild to transactions
Autogenerate 1
While Date($(StartDate)+(Iterno()-1)) <=Date($(EndDate))
;