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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.