Forum Discussion
Sorting and visualizing data
1. My table looks something like this
temp1 names min right-now max
temp10 name1 6 7 13
temp11 name2 9 10 53
temp2 .... 12 14 35
temp3
temp4
Problem here is that temp is wrong, it should go from 1 to 10, but program does it other way, 1,10,11,2,3,4,5,6,7,8,9
Is there someway i could fix this? so that numbers would go from 1 to 10? (temp) If i try sorting, it just changes 1 and 9 (up or down)
2.
Kuupäev Temp1 Temp2 Temp3 Temp4 Temp5 Temp6 Temp7 Temp8 Temp9 Temp10 Temp11
| 06.Oct/2015 | 23°C | -21°C | 5°C | 8°C | 5°C | 6°C | 5°C | -29°C | 5°C | 5°C | 11°C |
| 05.Oct/2015 | 18°C | -25°C | 5°C | 7°C | 5°C | 6°C | 8°C | -28°C | 4°C | 5°C | 8°C |
| 04.Oct/2015 | 22°C | -20°C | 6°C | 9°C | 4°C | 4°C | 8°C | -21°C | 6°C | 5°C | 9°C |
| 03.Oct/2015 | 24°C | -27°C | 6°C | 9°C | 4°C | 4°C | 5°C | -23°C | 3°C | 5°C | 5°C |
i have this big table, 1 month data, i just picked out latest dates. Is there a way to put this big 1 month data into some kind of graph?
Hi helger. I'm not sure exactly what you want the graph to look like, but if you want something where you have a line for each name, your data should look something like this:
Date Name Temperature
1/1/2015 NameA 23
1/1/2015 NameB 24
1/2/2015 NameA 25
1/2/2015 NameB 24
Power BI really works with a columnar storage engine, so each value or attribute should be in its own column. You can do things like max/min/average as calculations on top of this so just storing the raw data is easiest.
Hope that helps!
10 Replies
- deldersveldResident Rockstar
1. The temp column is sorting as text, where 1, 10, and 11 all are ordered before 2. If the column only contains numbers for temp already, try changing the Data Type to "Whole Number", and the sorting behavior should change to 1, 2, [...] 10, 11. If your data actually has "temp1", "temp10", "temp2"; *one* method would be to use Split Column-->By Delimiter on the Transform tab and use a Custom delimiter = "temp". This will separate the word "temp" from the actual number, and you can remove the extra column created. There are other ways to parse the text too.
2. The table data would likely plot on a graph better if it were unpivoted so that the data for the separate Temp1, Temp2, etc. columns are all in one value column. On the Transform tab, highlight the various "Temp" columns and click "Unpivot Columns". This will create two new columns for "Attribute" and "Values" where Attribute will contain the former column names and Values contains the temp data. Once the data is in this format, trying plotting it.
- helgerNew Member
First part is fixed now, thanks
Second, not much, i did as u said, made attribute and Values on all of the temps, so i have like 10 values and attributes
But still putting them into graph seems to be the hard part, for me right now at least. I am trying to put them in Line chart and in Fields, i put the dates to axis, the attribute to legend and count of value to...value. But i get one straight line with the value of 1(count of value)=How to i change this to just value and not count of value?. There is no option next to it, only remove field, count(distinct) and count
- LetBloodlineAdvocate I
Maybe it's formatted as text so he can't do anything else? Did you check the data type?
- mstefancikAdvocate IV
Or if it is possible change table names. For table names lower than 10 add prefix 0. temp01,temp02... it will order tables in a correct way.