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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.