
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Format number to month name in chart
I would like to create a slider chart to select a month name (jan->dez) with a static step of 1. So it should not be possible to move the arrow between 2 month. The selected month should be written in a variable. Therefore I have
- created a slider object,
- defined a variable,
- set the Min Value to "1",
- set the max value to "12",
- set the Static step to "1"
The slider shows me now the values from 1 to 12 and it works as I want so for, but the values will be presented as numbers. How can I format the numbers (1 to 12) as the month names? Is it possible to format the numbers as the month name in the chart tab "number"?
I tried to use something like "MMM" or "##.MMM.####" but the number will be always interpreted as day instead of month. And "#" could not be used as a placeholder.
Thanks for any help in advance.
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi daniel
kushal is right. This is the easiest way to do it. i will suggest these steps.
1:
create inline table in your model
LOAD *,Dual(MonthName,Month) as DualMonth Inline [
Month,MonthName
1,Jan
2,Feb
3,Mar
4,Apr
5,May
6,Jun
7,Jul
8,Aug
9,Sep
10,Oct
11,Nov
12,Dec
];
2:
use DualMonth as your filedname in the slider
3:
open variable overview and create a new variable v1 and in the definition =GetFieldSelections(DualMonth)
the value you selected in the slider will be written to the variable v1.
regards
Pradosh


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
=month(makedate(year(today()), YOURVARIABLE,1))
If a post helps to resolve your issue, please accept it as a Solution.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Share ua sample data.
Regards,
Bala

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think this will not solve my problem. At the moment my slider looks like this:
I would like to format the number to month names. So the slider should show "Jan" instead of 1 and so one.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
create inline table in your model
LOAD *,Dual(MonthName,Month) as DualMonth Inline [
Month,MonthName
1,Jan
2,Feb
3,Mar
4,Apr
5,May
6,Jun
7,Jul
8,Aug
9,Sep
10,Oct
11,Nov
12,Dec
];
Use DualMonth field in slider instead variable

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply.
Are there any possibilities to keep the variable? So that the selected value in the slider will be written in a variable?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nope, can't do with a variable
You can retrieve the selected value from the Month field
If a post helps to resolve your issue, please accept it as a Solution.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi daniel
kushal is right. This is the easiest way to do it. i will suggest these steps.
1:
create inline table in your model
LOAD *,Dual(MonthName,Month) as DualMonth Inline [
Month,MonthName
1,Jan
2,Feb
3,Mar
4,Apr
5,May
6,Jun
7,Jul
8,Aug
9,Sep
10,Oct
11,Nov
12,Dec
];
2:
use DualMonth as your filedname in the slider
3:
open variable overview and create a new variable v1 and in the definition =GetFieldSelections(DualMonth)
the value you selected in the slider will be written to the variable v1.
regards
Pradosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can create the variable on front end and put the below expression in variable
=num(only(DualMonth))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pradosh,
Thank you for your explanation and the sample file. With this information I was able to solve my issue.
regards
Daniel
