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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Kannan4444
Helper I
Helper I

Cumulative comparison for Month vs Month

Hey all,

Help need to see Cumulative trend by comparing Current month, vs prior month and same period vs previous year.

tried various formula from

Cumulative 1 = CALCULATE(SUM(BaselineView[KT]),DATESMTD('Load Calendar'[Load date]))
Cumulative 2 = CALCULATE(SUM(BaselineView[KT]),FILTER(ALLSELECTED(BaselineView),BaselineView[LoadDate] <= MAX(BaselineView[LoadDate])))
Cumulative 3 = CALCULATE([Total sales LM],FILTERALL('Load Calendar'),'Load Calendar'[Load date]<='Load Calendar'[Load date]))

 

Created Mearure to calculate Previous month

Total sales LM = CALCULATE([Total KT], DATEADD('Load Calendar'[Load date],-1,MONTH))
 
Please help me Guys Kannan4444_0-1679581883143.png

 

Kannan4444_1-1679581903264.png
Date Volume  Cumulative volume load placedischarge place
01-Jan-18         111                                     111OmanLoadSubregion
02-Jan-18           47                                     1580AG India
03-Jan-18           94                                     252USAN/A
04-Jan-18           67                                     319USANorth America
05-Jan-18           39                                     358IndonesiaNorth America
06-Jan-18           33                                     391IndonesiaSE Asia
07-Jan-18           36                                     427RomaniaSE Asia
08-Jan-18           35                                     462South KoreaMED
09-Jan-18           75                                     537CanadaNE Asia Oz
10-Jan-18           17                                     554CanadaNorth America
11-Jan-18           50                                     604AngolaNorth America
12-Jan-18           35                                     639BrazilWAF SAF
13-Jan-18           61                                     700BrazilLatam
14-Jan-18           50                                     750CanadaLatam
15-Jan-18           34                                     784CanadaNorth America
16-Jan-18           32                                     816CanadaNorth America
17-Jan-18           67                                     883ChinaNorth America
18-Jan-18           51                                     934GreeceChina
19-Jan-18           65                                     999GreeceMED
20-Jan-18           42                                 1,041IndiaMED
21-Jan-18           83                                 1,124IndiaAG India
22-Jan-18           67                                 1,191LithuaniaAG India
23-Jan-18           10                                 1,201MexicoFSU
24-Jan-18             9                                 1,210MexicoLatam
25-Jan-18           28                                 1,238SingaporeLatam
26-Jan-18           60                                 1,298SingaporeSE Asia
27-Jan-18           96                                 1,394SingaporeSE Asia
28-Jan-18           54                                 1,448Taiwan, Republic of ChinaSE Asia
29-Jan-18           94                                 1,542Taiwan, Republic of ChinaNE Asia Oz
30-Jan-18           50                                 1,592USANE Asia Oz
31-Jan-18           31                                 1,623USANorth America
01-Feb-18         122                                     122South KoreaNorth America
02-Feb-18           58                                     180USANE Asia Oz
03-Feb-18           85                                     265USANorth America
04-Feb-18           11                                     276AustraliaNorth America
05-Feb-18           57                                     333AustraliaNE Asia Oz
06-Feb-18           48                                     381BelgiumNE Asia Oz
07-Feb-18           53                                     434BelgiumNWE
08-Feb-18           36                                     470BelgiumNWE
09-Feb-18             3                                     473GreeceNWE
10-Feb-18           74                                     547GreeceMED
11-Feb-18           90                                     637IndiaMED
12-Feb-18           55                                     692IndiaAG India
13-Feb-18           97                                     789RomaniaAG India
14-Feb-18           63                                     852RomaniaMED
15-Feb-18             7                                     859Russian FederationMED
16-Feb-18             9                                     868SingaporeFSU
17-Feb-18           82                                     950SingaporeSE Asia
18-Feb-18           66                                 1,016South KoreaSE Asia
19-Feb-18           82                                 1,098South KoreaNE Asia Oz
20-Feb-18           41                                 1,139South KoreaNE Asia Oz
21-Feb-18           92                                 1,231South KoreaNE Asia Oz
22-Feb-18           80                                 1,311South KoreaNE Asia Oz
23-Feb-18           12                                 1,323SpainNE Asia Oz
24-Feb-18           53                                 1,376ThailandMED
25-Feb-18           89                                 1,465USASE Asia
26-Feb-18           24                                 1,489USANorth America
27-Feb-18           51                                 1,540USANorth America
28-Feb-18           20                                 1,560USANorth America
01-Mar-18         133                                     133USANorth America
02-Mar-18           97                                     230USANorth America
03-Mar-18           76                                     306USANorth America
04-Mar-18           66                                     372USANorth America
05-Mar-18           81                                     453CanadaNorth America
06-Mar-18           70                                     523CanadaNorth America
07-Mar-18           77                                     600CanadaNorth America
08-Mar-18           37                                     637USANorth America
09-Mar-18           87                                     724South KoreaNorth America
10-Mar-18           74                                     798South KoreaNE Asia Oz
11-Mar-18           73                                     871IndiaNE Asia Oz
12-Mar-18           64                                     935IndonesiaAG India
13-Mar-18           97                                 1,032IndonesiaSE Asia
14-Mar-18           80                                 1,112PortugalSE Asia
15-Mar-18           69                                 1,181Russian FederationNWE
16-Mar-18           90                                 1,271United KingdomFSU
17-Mar-18           41                                 1,312United KingdomNWE
18-Mar-18           14                                 1,326USANWE
19-Mar-18           72                                 1,398USANorth America
20-Mar-18             3                                 1,401AustraliaNorth America
21-Mar-18           71                                 1,472IndonesiaNE Asia Oz

 

7 REPLIES 7
Kannan4444
Helper I
Helper I

Actually I have 5 years of data. Just to give am example i kept the data limited.

Agree the dates differ, Is there a way to see the previous month data. 🤔

have you considered my second point? What is your decision?

It will not be 100% match,but it helps us to see the comparions. 

 

I also have a pbix uploaded in the below link,

 

https://1drv.ms/u/s!AhLDlY0KU7uTavcpBl9vRheZLX4?e=3hMC8s

 

Before you do your comparison you may want to adjust your data model.  Here is how I would structure it

 

lbendlin_0-1679840571164.png

 

 

A single calendar table with an active connection to Load date and an inactive connection to Discharge date

 

Same for the geography dimension. Technically you should get rid of the port column as it is not joined to the fact table. If you make country the primary key you can then link it the same way - actively to Load country and inactively to Discharge country.

 

With that type of data model your computations will be much easier.

Hey Guys, Any help please...!!!!

 

https://1drv.ms/u/s!AhLDlY0KU7uTavcpBl9vRheZLX4?e=3hMC8s

 

Sure thanks for that. Can you please help me with the Measure how to bring the Cumulative for comparison.

lbendlin
Super User
Super User

There are a couple of complications here that you need to consider

 

- your sample data does not contain last year's data

- for a month over month comparison you need to realize that January has 31 days, February has 28 days and March has 21 days (in your sample data).  Comparing these is "not fair".

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Kudoed Authors