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
AkhilAshok
Solution Sage
7 years agoWell.. best option is to create a mapping table (using Enter Data feature or Excel Sharepoint or even in a DB) with 2 columns, i.e., Index & Group. Afterwards, you can just create a relationship between the Data[Index] & Mapping[Index].
This way you don't need to write any complex DAX code! In case of new data, you just update the mapping table to reflect new index & groups.
- Anonymous7 years agoNot applicable
Hello AkhilAshok
could you explain alittle what exactly you are talking about, it sounds to make sence, Im not sure how to do what you suggest.
thanks for the help.