Forum Discussion
Giada90
4 months agoHelper IV
difference in grafic line
Hi, I need a database like this; year month status number 2025 january closed 10 2025 january open 2 2025 fabruary closed 7 2025 fabruary open 3 2025 march closed...
- 4 months ago
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 - _OpenStep 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
Giada90
4 months agoHelper IV
thanks!