Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Reorder Columns on table created by Union & Row

I have created a table from calculated measures using Union & Row.  I want the Grand Total column to appear on the left side of my visualization, but it is at the far right.  I tried adding an Index column and sorting by that, but the Grand Total column stays on the right.  How do I move it to the left side?

 

My table is created using this:

 

Table = UNION(
row("Index","2","Year","2018","Total",value([MRC Yr+0]),"MRC",[mrctotalyr+0]),
row("Index","3","Year","2019","Total",value([MRC Yr+1]),"MRC",[mrctotalyr+1]),
row("Index","4","Year","2020","Total",value([MRC Yr+2]),"MRC",[mrctotalyr+2]),
row("Index","5","Year","2021","Total",value([MRC Yr+3]),"MRC",[mrctotalyr+3]),
row("Index","6","Year","2022","Total",value([MRC Yr+4]),"MRC",[mrctotalyr+4]),
row("Index","7","Year","2023","Total",value([MRC Yr+5]),"MRC",[mrctotalyr+5]),
row("Index","8","Year","2024","Total",value([MRC Yr+6]),"MRC",[mrctotalyr+6]),
row("Index","9","Year","2025","Total",value([MRC Yr+7]),"MRC",[mrctotalyr+7]),
row("Index","10","Year","2026","Total",value([MRC Yr+8]),"MRC",[mrctotalyr+8]),
row("Index","11","Year","2027","Total",value([MRC Yr+9]),"MRC",[mrctotalyr+9]),
row("Index","12","Year","2028","Total",value([MRC Yr+10]),"MRC",[mrctotalyr+10]),
row("Index","1","Year","Grand Total","Total",MsrTable[Total],"MRC",0)
)

 

My chart looks like this:

 

  • Have you set the "Year" column to be sorted by your "Index" column?

     

    That worked for me.

     

     

2 Replies

  • dramus's avatar
    dramus
    Icon for Continued Contributor rankContinued Contributor

    Have you set the "Year" column to be sorted by your "Index" column?

     

    That worked for me.

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you!  Yes - that works perfectly!