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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Giada90
Helper IV
Helper IV

difference in grafic line

Hi,

I need a database like this;

yearmonthstatusnumber
2025januaryclosed10
2025januaryopen2
2025fabruaryclosed7
2025fabruaryopen3
2025marchclosed8
2025marchopen1

 

I need to rapresent in a grafic line the difference for each month for status closed and open, how can I do?

thanks

1 ACCEPTED SOLUTION
cengizhanarslan
Super User
Super User

I am not sure what you require, MoM calculation for each Cloased and Open status or the difference for two status.

 

For the first scenario:

Step 1) Create the MoM measures

Closed MoM =
VAR _CurrentClosed =
    CALCULATE ( SUM ( Table1[Number] ), Table1[Status] = "closed" )
VAR _PreviousClosed =
    CALCULATE (
        SUM ( Table1[Number] ),
        Table1[Status] = "closed",
        DATEADD ( 'Date'[Date], -1, MONTH )
    )
RETURN
    DIVIDE ( _CurrentClosed - _PreviousClosed, _PreviousClosed )

Open MoM =
VAR _CurrentOpen =
    CALCULATE ( SUM ( Table1[Number] ), Table1[Status] = "open" )
VAR _PreviousOpen =
    CALCULATE (
        SUM ( Table1[Number] ),
        Table1[Status] = "open",
        DATEADD ( 'Date'[Date], -1, MONTH )
    )
RETURN
    DIVIDE ( _CurrentOpen - _PreviousOpen, _PreviousOpen )

 

Step 2) Configure the line chart

Configure the line chart with Month on the X axis, both measures on the Y axis, and format both as percentage. This gives you two separate lines showing the month-over-month growth rate for closed tickets and open tickets independently.

 

Second scenario:

Step 1) Create the difference measure

Closed vs Open Difference =
VAR _Closed =
    CALCULATE ( SUM ( Table1[Number] ), Table1[Status] = "closed" )
VAR _Open =
    CALCULATE ( SUM ( Table1[Number] ), Table1[Status] = "open" )
RETURN
    _Closed - _Open

 

Step 2) Configure the line chart

  • X axis: Month (sort it by a month number column so it shows January, February, March in correct order rather than alphabetically)
  • Y axis: Closed vs Open Difference
_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.

View solution in original post

3 REPLIES 3
Giada90
Helper IV
Helper IV

thanks!

krishnakanth240
Resident Rockstar
Resident Rockstar

Hi @Giada90 

Create measure that calculates difference between Closed and Open for each month and use it in a line chart.

Difference =

CALCULATE(SUM('Table'[number]), 'Table'[status] = "closed") - CALCULATE(SUM('Table'[number]), 'Table'[status] = "open") then place year-month colum on X-axis and use Difference into value

 

If this was not your requirement then you can provide the sample output you are looking for

cengizhanarslan
Super User
Super User

I am not sure what you require, MoM calculation for each Cloased and Open status or the difference for two status.

 

For the first scenario:

Step 1) Create the MoM measures

Closed MoM =
VAR _CurrentClosed =
    CALCULATE ( SUM ( Table1[Number] ), Table1[Status] = "closed" )
VAR _PreviousClosed =
    CALCULATE (
        SUM ( Table1[Number] ),
        Table1[Status] = "closed",
        DATEADD ( 'Date'[Date], -1, MONTH )
    )
RETURN
    DIVIDE ( _CurrentClosed - _PreviousClosed, _PreviousClosed )

Open MoM =
VAR _CurrentOpen =
    CALCULATE ( SUM ( Table1[Number] ), Table1[Status] = "open" )
VAR _PreviousOpen =
    CALCULATE (
        SUM ( Table1[Number] ),
        Table1[Status] = "open",
        DATEADD ( 'Date'[Date], -1, MONTH )
    )
RETURN
    DIVIDE ( _CurrentOpen - _PreviousOpen, _PreviousOpen )

 

Step 2) Configure the line chart

Configure the line chart with Month on the X axis, both measures on the Y axis, and format both as percentage. This gives you two separate lines showing the month-over-month growth rate for closed tickets and open tickets independently.

 

Second scenario:

Step 1) Create the difference measure

Closed vs Open Difference =
VAR _Closed =
    CALCULATE ( SUM ( Table1[Number] ), Table1[Status] = "closed" )
VAR _Open =
    CALCULATE ( SUM ( Table1[Number] ), Table1[Status] = "open" )
RETURN
    _Closed - _Open

 

Step 2) Configure the line chart

  • X axis: Month (sort it by a month number column so it shows January, February, March in correct order rather than alphabetically)
  • Y axis: Closed vs Open Difference
_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.