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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Brendan_1
Advocate I
Advocate I

Creating multiple columns for dates

I have several buildings where i want to get the vacancy rate for the last five years. I can't seem to figure out how to get all one building on a single row. Ideally it would look like this at the end of it:

 

  201120122013201420152016
PropertyIDProperty Name12341234123412341234123
39876Bemiston Tower11.08%11.08%9.67%9.67%9.12%9.12%10.72%9.38%10.33%9.52%18.98%18.98%11.75%11.75%11.74%13.35%12.34%12.34%12.41%12.41%10.46%9.40%8.87%
42132West Park I16.79%15.68%15.68%15.68%9.71%9.71%0.00%9.71%1.62%0.00%0.00%0.00%1.74%1.74%0.00%1.08%1.08%7.05%7.05%7.05%7.05%1.08%1.08%
4271677 Building18.05%18.05%18.05%18.05%18.05%7.27%7.42%7.67%7.67%7.67%12.08%12.08%15.16%15.16%15.16%15.16%15.80%15.80%27.68%27.68%27.68%44.87%44.87%

 

But when i try it looks like this:

 

PropertyIDStatDate (Year.Quarter)
398762010.4
398762011.4
398762012.4
398762013.4
398762014.4
398762015.4
398762016.4
421322010.4
421322011.4
421322012.4
421322013.4
421322014.4
421322015.4
421322016.4
427162010.4
427162011.4
427162012.4
427162013.4
427162014.4
427162015.4
427162016.4

 

I have a date column StatDate which has year, quarter, day, and month if needed. I tried creating a concatenate with that field "StatDate (Year.Quarter) = CONCATENATE('Building Data'[StatDate].[Year],CONCATENATE(".",'Building Data'[StatDate].[QuarterNo]))" in order to do a lookup - "VacancyRate2012 = LOOKUPVALUE('Building Data'[VacancyRate Stat Column],'Building Data'[StatDate (Year.Quarter)],"2012.4")" to return each quarter that i wanted, but the error i receive is "A table of multiple values was supplied where a single value was expected. 

 

Any Idea how i can do this?

2 REPLIES 2
Sean
Community Champion
Community Champion

What you've pasted above is a Pivot Table with 2 Row and 2 Column Items.

Can you instead paste a sample of the source tables for that Pivot Table?

PropertyID     Vacancy Rate      StatDate
39876             0.11                     1/1/2014
39876             0.09                     1/1/2015
39876             0.08                     1/1/2016
39876             0.07                      4/1/2016
39876             0.06                      7/1/2016
39876             0.08                      9/1/2016
39876             0.12                      4/1/2015

 

The database is a SQL server database. The first table i copied in there from how i was able to create it in Tableau but i'd like to do that in PowerBI.  Is this what you were asking for?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Users online (8,155)