Tm1py: execute_mdx_dataframe_pivot column order is not same as MDX

Created on 3 Dec 2020  路  3Comments  路  Source: cubewise-code/tm1py

Describe the bug
even i stated "Sales Qty" first, and "Sales Amount (LCY)" second for M Sales dimension as columns, the column order in pivot table is not same as MDX

To Reproduce
image

Expected behavior
pivot table column order is shown according to MDX given

Version
TM1py Version: 1.5.0
TM1 Server Version: 11.8.0.33

bug

All 3 comments

Hi @yyzz1010,

thanks for reporting the issue. I will look into this.

Pivot tables in pandas are real beasts. Perhaps for the moment, it's easiest if you just use the execute_mdx_dataframe_shaped function. Then you get a normal data frame but in the shape of the query/view.

Thanks @MariusWirtz, this is exactly what I want!! but this function is not documented here so I didn't know about it.

Happy to hear that this is helpful for you.
I will regenerate the docs.

To know what functions are available in the different services I would recommend also using the autocompletion features of tools like Juypter or PyCharm. It can be a good way to discover the functionality in TM1py.

image

image

image

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hermie64 picture hermie64  路  4Comments

scrambldchannel picture scrambldchannel  路  6Comments

VY109 picture VY109  路  4Comments

hermie64 picture hermie64  路  3Comments

fidong picture fidong  路  3Comments