Forum Discussion

QNLP's avatar
QNLP
Frequent Visitor
1 year ago
Solved

HELP! complicated grouped line chart

 How can I draw this graph in powerBI?

 This graph shows "defect ratio" according to elapsed months. Each single line means manufactured month. But the legend and color should be by "model"

  • I think all data table are already well prepaired but I couldn't find how to draw  this. I mean....when I put "model" in legend, manufactured month is totally ignored(just one line per model). when I put "manufactured month" in legend, model is ignored.

 

My table has columns as follows

Modelname, manufactured month, elapsed month, defect ratio

 

I have drawn this graph successfully with altair library.

 

Thank you.

 

7 Replies

  • The Deneb visual in Power BI can give you that directly, but the standard line chart can do it too (until you hit the forced binning thresholds)

     

    Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
    Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
    Please show the expected outcome based on the sample data you provided.

    Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
    Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

  • QNLP's avatar
    QNLP
    Frequent Visitor

    Dear Super User,

    Thank you for kind help.

    Now I pasted the sample data that covers my issue.

    I am really looking forward to learning it !

    * Data is seperated by TAB

    Model Mfd_month Elapsed_month Ratio
    Model_A 202405 1 0.8
    Model_A 202405 2 1.131
    Model_A 202405 3 1.386
    Model_A 202405 4 1.6
    Model_A 202405 5 1.789
    Model_A 202405 6 1.96
    Model_A 202405 7 2.117
    Model_A 202406 1 1
    Model_A 202406 2 1.414
    Model_A 202406 3 1.732
    Model_A 202406 4 2
    Model_A 202406 5 2.236
    Model_A 202406 6 2.449
    Model_A 202407 1 1.2
    Model_A 202407 2 1.697
    Model_A 202407 3 2.078
    Model_A 202407 4 2.4
    Model_A 202407 5 2.683
    Model_A 202405 1 0.15
    Model_B 202405 2 0.212
    Model_B 202405 3 0.26
    Model_B 202405 4 0.3
    Model_B 202405 5 0.335
    Model_B 202405 6 0.367
    Model_B 202405 7 0.397
    Model_B 202406 1 0.3
    Model_B 202406 2 0.42
    Model_B 202406 3 0.52
    Model_B 202406 4 0.6
    Model_B 202406 5 0.671
    Model_B 202406 6 0.73
    Model_B 202407 1 0.4
    Model_B 202407 2 0.566
    Model_B 202407 3 0.693
    Model_B 202407 4 0.8
    Model_B 202407 5 0.894
      • QNLP's avatar
        QNLP
        Frequent Visitor

        No, sir. Just two colors.

        Model_A : blue

        Model_B : red.  for example.