Forum Discussion

Janaya1's avatar
Janaya1
Frequent Visitor
2 years ago

Dynamic Line Chart with Wide Table

Hello,

 

I have a wide data table (1 row per unique ID and hundreds of numerical and text columns for each row) and I am trying to create line chart where the y-axis can change depending on slicer selection. I have created a parameter with the names of the columns I want to use for this chart but I cannot seem to figure out how to actually create a line chart using this. I want the x-axis to be the unique ID increasing from left to right. Here is an example data table:

 

[Data]

Batch NumberDoMMeasure 1 Measure 2Text 1Text 2Measure 3
A0011/12/2023905555YFail1.2
A0022/20/2023854560YSuccess3.6
A0033/12/2023939000NSuccess4.4
B0014/25/2023764000NSuccess2.2

 

And the Parameter Table that was created:

 

[Parameters]

Measure Parameter
Measure 1
Measure 2
Measure 3

 

I've tried placing Batch Number in the x-axis and the Measure Parameter in the y-axis to no avail, and not sure where to go from here. I have done successfully in the past in Tableau and Spotfire without having to transform the entire spreadsheet into a long table format. Is this possible in the current table format?

 

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi @Janaya1 ,

    According to your requirements, I create a table and a parameter.

    Then I create a slicer and add the Batch Number in the slicer.

     

    Finally we can select when we put Batch Number in x-axis and Measures in y-axis.

     

     

     

    Best Regards

    Yilong Zhou

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Janaya1's avatar
      Janaya1
      Frequent Visitor

      Sorry it took me awhile to respond, I was trying to get my company to update the Power BI version in the portal to be able to open the file you sent. That's not quite what I'm looking for. I want all of the "Batch Number" on the x-axis to be there, and I want the y-axis to show one variable at a time in a line chart and then I could select from a dropdown to change the y-axis variable. I can't seem to attach a file to my replies