Skip to content

[BUG]: ___report.py to_dataframe() parser.py error when metrics are in rows #236

Description

@hustontrevor

Description

Somebody forgot to code for the other _instance['metricsPosition'] option.

MicroStrategy Support Case

NA

Steps To Reproduce

Make a grid report with an Attribute (like Month) in the Columns and [Metric Names] in the Rows and add some metrics.

parser.py will fail with an invalid key 'name' inside __extract_metric_col_names

Code Snippet

with Connection(source_url, username, password) as mstr_conn:                        
            project_id='<p_id>'            
            mstr_conn.select_project(project_id=project_id)
            rpt_id = '<id>'
            mstr_rpt = Report(connection=mstr_conn,id=rpt_id)            
            rpt_prompts = mstr_rpt.prompts  # use the default values            
            rpt_df = mstr_rpt.to_dataframe(prompt_answers=rpt_prompts)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnewThe item has just been created and was not seen by MSTR developer yet

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions