Forum Discussion
Anonymous
7 years agoNot applicable
make code simple
Hello, i have data that im using to display some lines on a line graph. In order for them to display correctly i need to force the data points to group in a certin way through the "Final" column. for...
- 7 years ago
hi, Anonymous
You may try this formula as below:
Column 2 = SWITCH(TRUE(), Table1[Index]>=1&&Table1[Index]<=4,1, Table1[Index]>=5&&Table1[Index]<=6,2, Table1[Index]>=7&&Table1[Index]<=10,3, Table1[Index]>=11&&Table1[Index]<=12,4, Table1[Index]>=13&&Table1[Index]<=16,5, Table1[Index]>=17&&Table1[Index]<=18,6, Table1[Index]>=19&&Table1[Index]<=22,7, Table1[Index]>=23&&Table1[Index]<=24,8, Table1[Index]>=25&&Table1[Index]<=29,9, Table1[Index]>=30&&Table1[Index]<=34,10, 11)
Best Regards,
Lin
jthomson
Solution Sage
7 years agoYou could try using SWITCH, which I've seen some people use in this spot, you could try a lookup table, rather than listing every possible option you could go if <5, 1, if <7, 2, if <11, 3 etc...
- Anonymous7 years agoNot applicable
I think I get what your saying, if it would be alright, could you show me what it would look like , Im rather new to the coding in Power BI.
thank you for the help.
-Collin