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
Anonymous
Not applicable

Converting from quarterly data collection to monthly data collection

Hi everyone,

 

I have two tables, one as a standard date table(DateTable), and a data collection table{OfficeStats) that captures statistics for office buildings in my city (Houston). We have data from 1999 that was provided only on a quarterly basis. 

 

Within the OfficeStats table, we have these 4 columns:

  • BuildingID
  • MonthRecorded
  • RentableSquareFeet
  • VacantSquareFeet

 

Two months ago,  we started tracking these statistics on a monthly basis. For example the last 12 rows would look like this under MonthRecorded:

 

  • 3/1/2018
  • 2/1/2018
  • 1/1/2018
  • 10/1/2017
  • 7/1/2017
  • 4/1/2017
  • 1/1/2017
  • 10/1/2016
  • 7/1/2016
  • 4/1/2016
  • 1/1/2016
  • 10/1/2015....and so on

 

So the functions to compare previous quarters, months or years based upon March 2018 don't work because there's no data for 3/1/2017, or 12/1/2016. I have no issue using the same numbers from 10/1/20XX for 11/1/20XX and 12/1/20XX but don't know a good way to do this. Any ideas?

 

 

 

 

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

It will be very useful if you show both tables and also your expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi Everyone - it sounds like a need to do abetter job of explaining what I"m asking about. I'm tracking historical stats for Houston office buildings. One table is the standard date table I created in the advanced editor.

 

The other table has roughly 50,000 rows of data, table "OfficeStats." The data I have is from 1999 and each period the data is collected creates one new row each building. We track about 700 buildings. This table has the following columns:

 

  • ID: Autonumber
  • MonthRecorded:
  • RSF(rentable square feet): Whole Number
  • Vacant SF: Whole Number
  • Sublease SF: Whole Number

 

That's it - no calculated columns.

 

So since 1999, the table has entries like this:

 

PropertyIDMonthRecordedRSFVacant SFSublease SF
64592561/1/2018305885277910
2348911/1/2018279329470800
2359371/1/2018239417721240
2398151/1/2018117261255193467
60192721/1/201832740430932118352
2396061/1/2018162909715130
2399681/1/20181104801104800
2401361/1/201892868152830
2400851/1/2018130828461670
2403411/1/20184160723380
2397781/1/201812065100
2403431/1/20182576048250
3535701/1/20181554071009810
64530011/1/20188975000
2401431/1/201864980445880
235581/1/20183532334550
2396321/1/2018183268925050

 

So for 4 times a year, we have 700 rows of data, that are all saved under MonthRecorded as:

 

  • 1/1/1999
  • 4/1/1999
  • 7/1/1999
  • 10/1/1999
  • 1/1/2000
  • 4/1/2000
  • 7/1/2000
  • 10/1/2000
  • 1/1/2001
  • and so on...

Moving forward, we going to record this information on a monthly basis. For example, if I enterered in data from 3/1/2018 and I try to use a function to look back three months, the value is 0 because there are no records from 12/1/2017.

 

I'd like to fill in the 8 months that do not have any data - February, March, May, June, August, September, November & December. I'm ok with just copying from the previous month, or previous two months.

 

But I don't know how to do that. If i use a conditional column, how do I get everything into the final format with just one singular data column?

Greg_Deckler
Super User
Super User

I can think of 2 ways of doing this. One way is that you create a new table which is a NATURALINNERJOIN of your Monthly table (all years, all months) and your Quarterly table. You should end up with a table with all of your Month/Years and values for your months that you have data for. You could then create a new column that essentially is if there is a value, use that value, otherwise, use the last value you have in the table (most recent with respect to that row).

 

The other way is essentially the same thing in M code (Power Query).

 

If you need further help, please refer to:

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.