Commit 47134b6b authored by Mouadh's avatar Mouadh

fix celldata

parent b614aacd
...@@ -301,11 +301,19 @@ class XmlaExecuteTools(): ...@@ -301,11 +301,19 @@ class XmlaExecuteTools():
:return: CellData as string :return: CellData as string
""" """
columns_loop = [] columns_loop = []
if mdx_execution_result['columns_desc']['columns'].keys(
) and mdx_execution_result['columns_desc']['rows'].keys(): if (len(mdx_execution_result['columns_desc']['columns'].keys()) == 0) ^ (
len(mdx_execution_result['columns_desc']['rows'].keys()) == 0):
if self.executer.facts in mdx_execution_result['columns_desc'][ if self.executer.facts in mdx_execution_result['columns_desc'][
'columns'].keys() + mdx_execution_result['columns_desc'][ 'all'].keys():
'rows'].keys():
# iterate DataFrame horizontally
columns_loop = itertools.chain(* [
mdx_execution_result['result'][measure]
for measure in mdx_execution_result['result'].columns
])
else:
# iterate DataFrame vertically # iterate DataFrame vertically
columns_loop = itertools.chain(* [ columns_loop = itertools.chain(* [
...@@ -313,12 +321,6 @@ class XmlaExecuteTools(): ...@@ -313,12 +321,6 @@ class XmlaExecuteTools():
for tuple in mdx_execution_result['result'].itertuples( for tuple in mdx_execution_result['result'].itertuples(
index=False) index=False)
]) ])
else:
# iterate DataFrame horizontally
columns_loop = itertools.chain(* [
mdx_execution_result['result'][measure]
for measure in mdx_execution_result['result'].columns
])
cell_data = "" cell_data = ""
index = 0 index = 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment