1

I'm trying to make a line chart on WebI 4.2 Support Pack 4 Compilation : 14.2.4.2410. I have an array with my number of order for each month.

+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ | 165 | 221 | 150 | 214 | 105 | 18 | 115 | 15 | 201 | 26 | 102 | 101 | +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+

For exemple I use this function in my measures changing the month at the end to get my total of orders.

=Number([Id]) In ([Date]) Where (Month(ToDate([Date]; "dd/MM/yy")) ="january")

How can I get a line chart with my months in x-coordinate and my number of orders in y-coordinate ? I think that I'm totally wrong in my method cause I really don't find how to use line chart correctly. Should I have my months as dimension variables ?

I do not have the right to post pictures yet to illustrate what I want and sorry for my english level.

Skyshufeu
  • 62
  • 1
  • 10

1 Answers1

0

I believe you are making this more difficult that it needs to be. It seems like you do not have the Month name in your data. So create a variable to get that. If the object containing your date is a Date data type it would look like this...

Month=Month([Date])

If your date is a string you would do something like this...

Month=Month(ToDate([Date]; "dd/MM/yy"))

If you don't have a measure for your number of orders you will need a variable counting them...

Number of Orders=Count(ID)

Then create a table with Month and Number of Orders. Create a custom sort order if you want the months in chronological order. You can easily create a line chart by right-clicking on your table and choosing "Turn Into > Line Chart".

I did this with a Calendar table I have with a count of the number of days in each month in 2019.

enter image description here

Isaac
  • 3,240
  • 2
  • 24
  • 31
  • Great ! My two functions were wrong as you said. I need to get all months in a variable and that work perfectly with the second function. – Skyshufeu Dec 10 '19 at 15:25