Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
PurpleWave22
Advocate II
Advocate II

Calculate Annual Flat Rate on Monthly Graph

I'm having some difficulty in calculating a flat annual rate on a monthly graph.

 

I have three tables:

  1. Complaint Table: breakdown of product complaints
  2. Date Table
  3. Case Table: breakdown of number of product cases by date

 

Complaint Table is related to Date Table through a creation date field while the Case Table is related to the Date Table through case date field.

 

I have a combo line and stacked column chart where the bars are the number of complaints, the line is the complaint rate, and the x-axis is date displayed on a year-month level:

PurpleWave22_0-1681751944206.png

 

The goal is to add two flat lines to the graph: 

  1. A flat average complaint rate for the year
  2. 3x the standard deviation of the complaint rate for the year

 

I'm just not sure how to calculate on an annual basis when the graph is displayed on a monthly basis.

 

For reference:

 

Complaints =
CALCULATE (
    DISTINCTCOUNT ( 'Complaint Table'[Complaint ID] ),
    'Complaint Table'[Is this a complaint?] = "Yes"
) + 0

 

FT Complaint Rate = 'Complaint Table'[Complaints] / SUM('Case Table'[Total Cases])

 

Any help would be appreciated!

1 ACCEPTED SOLUTION
Mahesh0016
Super User
Super User

@PurpleWave22 Please try this measure 

Complaints =
CALCULATE (
    DISTINCTCOUNT ( 'Complaint Table'[Complaint ID] ),
    'Complaint Table'[Is this a complaint?] = "Yes",
    ALLSELECTED('Complaint Table'[Year])
) + 0
 
@PurpleWave22 i hope this help you.
 

View solution in original post

2 REPLIES 2
Mahesh0016
Super User
Super User

@PurpleWave22 Please try this measure 

Complaints =
CALCULATE (
    DISTINCTCOUNT ( 'Complaint Table'[Complaint ID] ),
    'Complaint Table'[Is this a complaint?] = "Yes",
    ALLSELECTED('Complaint Table'[Year])
) + 0
 
@PurpleWave22 i hope this help you.
 

That worked! Thanks so much for your help.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.