Reply
Member
Posts: 52
Registered: ‎01-31-2017

Difference between 2 columns, periods of time

I have a column in one table representing Monthly Customer Spend.  A relationship exists between this table and a DateKey Table.

 

All of this is represented in a "Matrix" style table, which neatly shows me customer spend in each period of time.  Month, Quarter, Year, etc.

 

I would like to understand the difference in ustomer spend, between the two (or more) periods of time.

 

I am looking to understand the difference in spend, between two periods of time to determine whether a customer is increasing, decreasing spend between the periods of time.

 

All help is appreciated.

Highlighted
Super Contributor
Posts: 923
Registered: ‎11-29-2015

Re: Difference between 2 columns, periods of time

Hi @irnm8dn,

 

The good news is that you will be able to build your matrix with all the  measures you mention.

 

It will be much easier for us to provide help in the form of calculated measures etc, if you can provide some small samples of your data.  Smiley Happy

 

Member
Posts: 52
Registered: ‎01-31-2017

Re: Difference between 2 columns, periods of time

Once again @Phil_Seamark to the resuce!  Thanks.

 

The link below will take you to a sample dataset.  Please keep in mind that this is joined with a datekey table.  (Not the time-based columns in the sample data.)

 

https://www.dropbox.com/s/vzop8t9zve84fht/Sample%20Data%203.21.17.csv?dl=0

 

Please advise on the recommended calculated measures.

 

The end goal is to show the difference between 2 ore more periods of time.  Month vs. Month, Qtr vs. Qtr, Year vs. Year.

 

Cheers!

Super Contributor
Posts: 923
Registered: ‎11-29-2015

Re: Difference between 2 columns, periods of time

Hi @irnm8dn,

 

I've built a small sample PBIX file which I've uploaded here

 

Demo file

 

The essesnce is it makes the most of the columns in the DATE table to peform the PREVIOUSMONTH, PREVIOUSQUARTER & PREVIOUSYEAR calculations, and make sure these are the columns you use on the axis of your visuals.

 

Spend Stuff.png

 

 

Member
Posts: 52
Registered: ‎01-31-2017

Re: Difference between 2 columns, periods of time

@Phil_Seamark

 

Thanks!  Seems like the right solution, but I am getting an error with the file download.  Any opportunity to place it in Dropbox?

 

Capture.PNG

 

Appreciate the help.

Super Contributor
Posts: 923
Registered: ‎11-29-2015

Re: Difference between 2 columns, periods of time

Member
Posts: 52
Registered: ‎01-31-2017

Re: Difference between 2 columns, periods of time

Thanks @Phil_Seamark

 

Last question.  What are you applying to have your dates lay in proper chronological order?

 

You're a life saver!

Super Contributor
Posts: 923
Registered: ‎11-29-2015

Re: Difference between 2 columns, periods of time

Hi @irnm8dn

 

Which dates in particular?  

 

If you  mean months, I make sure the column called [Month] in the Dates table is sorted by [MonthID] from the same table

 

 

Sort by Month.png