Forum Discussion

Wendy_WL's avatar
Wendy_WL
Regular Visitor
2 years ago

Please help : Line Chart

Hello,

My line chart shows monthly % of bad debt for Branch A, Branch B, Branch C.

Really appreciate your assistance on :

Q1.  How to have a line in the chart to show Total % (shown in first picture below with the Row Total in Green Font): 

Total % for all Branches 1.9%(Jan), 1.5%(Feb), 3.3%(Mar), 1.3%(Apr), 0.9%(May), 1.1%(Jun), 1.1%(Jul), 1.5%(Aug), 1.5%(Sep).

Q2.  How to show Average % (shown in first picture below with the Column Total in Red Font): 

Average 1.7% for Branch A, Average 1.1% for Branch B, Average 2.5% for Branch C, 1.5% (Average for all Branches).

Q3. Existing line chart is for month-to-month comparison.  How to have a measure and chart to show quarterly comparison? E.g. Jan to Mar'23 vs Apr to Jun'23 vs Jul to Sep'23.

Link to my Power Bi file:  https://drive.google.com/drive/u/1/folders/1asxT1ZKW5ptoOcXc65zrhOKDVj-5uPJv 

New Measure: Bad Debt(BD)% =

VAR BD=

SUM('Branch Collection Records'[Value])

VAR All_Collection=CALCULATE(DISTINCTCOUNT('Branch Collection Records'[Collection Reference]))

RETURN

DIVIDE(BD,All_Collection)

New Column:  Value = if ([Bad Debt]="No", 0, 1)

 

 

2 Replies

  • HotChilli's avatar
    HotChilli
    Community Champion

    If you remove Branch from the Legend, you can create individual measures for each branch, probably of the form: 

    CALCULATE([measure], branch name = "branch A")

    So one for each branch and the basic measure on the line chart will get you what you want I think.

    Just looking at the bad debt measure in your post, I don't think you need the 'calculate' 

     

    -

    Q2 , I think you can use the Analytics tab in Visualisations, probably adding one trend line for each measure from my answer above.  It looks like you can use the Average section.

     

    Q3. Calendar table probably, related 1:m to the fact table.  It will allow you to slice and dice by your own custom date periods.

     

    All the best

  • truptis's avatar
    truptis
    Community Champion

    Result = calculate(measure, filter(branch_name="branch A"))