Forum Discussion
range in axis
- 5 years ago
Hi Vickram ,
You can create a grouping for your Age column in your data at follows:
AgeGroups = IF(tableanme[Age] >0 && tableanme[Age] <= 4, "0-4", IF(tableanme[Age] >4 && tableanme[Age] <= 10, "5-10"), IF(tableanme[Age] > 10 && tableanme[Age] <= 17, "11-17" , "Above 18"))
Once this column is there you can use to on x-axis of your chart.
Also try sharing some sample data.
Thanks,
Pragati
- 5 years ago
Vickram , If age and age range is columna is should be axis. Seems like you are creating measure for each age range. You can get bit of space using padding.
if Age is measure create dynamic segmentation- Refer this video https://www.youtube.com/watch?v=CuczXPj0N-k
- 5 years ago
Anonymous Thanks. I believe I did similar approach. Initally I used Switch, later I created custom column using If and Else If just as you mentioned. Only difference is I created a separate table for sorting order and use the merge queries to join the two queries to get the sorting order to my data query.
Hi Vickram ,
You can create a grouping for your Age column in your data at follows:
AgeGroups = IF(tableanme[Age] >0 && tableanme[Age] <= 4, "0-4", IF(tableanme[Age] >4 && tableanme[Age] <= 10, "5-10"), IF(tableanme[Age] > 10 && tableanme[Age] <= 17, "11-17" , "Above 18"))
Once this column is there you can use to on x-axis of your chart.
Also try sharing some sample data.
Thanks,
Pragati
Hi Pragati11 ,
It is a census data, which has age and population count like below:
Age Popualtion
--------- --------------
0 5267
1 8500
2 3600
3 4500
.
.
21 6200
22 1520
.
.
.
85 385
and so on.
So it is a big data contains millions of rows over differnt census year. That is why i am bit reluctanct to create a column in a table to define range.
I created measure for each range like