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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mwaters4
Helper I
Helper I

How do I join Calendar/Date Table to Summarized General Ledger / Financial table data

I have a table that has summarized general ledger transaction data (see below example excerpt).

It is summarized at the Branch - Dept - GLAccount - PostingPeriod (Month/Year) level.

 

I have a Calendar Table I created in Power BI that has fields to account for calendar quarters as well as Fiscal Quarters, Years, etc.

My question is how should I connect this Calendar table to the GL Date table in order to be able to use time intelligence functions, etc.?

There might be some other transactional tables I bring in that have fields down to the exact date so I can do some summary/detail kinds of drill ins, but I am a bit confused as to how to handle this in Power BI to make this join work.

Can someone please help me?  Thanks in advance... 

 

Summarized GL Date Table:

 

glDataExmple-2019-09-22_14-27-51.png

 

Calendar Table:

 

CalendarTableExample-2019-09-22_14-37-04.png

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @mwaters4 

On your GL data table add a field like [Posting Period Date] and make it the first day of the posting period in date format.  If the posting period is Sep-17 the [Posting Period Date] would be 9/1/2017.  Then you join the [Posting Period Date] into your Calendar[Date] field.

View solution in original post

3 REPLIES 3
jdbuchanan71
Super User
Super User

Hello @mwaters4 

On your GL data table add a field like [Posting Period Date] and make it the first day of the posting period in date format.  If the posting period is Sep-17 the [Posting Period Date] would be 9/1/2017.  Then you join the [Posting Period Date] into your Calendar[Date] field.

Thats great confirmation!  I did that shortly after posting this, but wasnt sure if that would be sufficient or not... 

Thanks!

 

Now... to tweak my question a bit... I was next trying to use time intelligence functions to get Rolling 12 month averages, YTD numbers of different accounts, departments, etc. and other measures.

Do you know if that is possible given the join method you are mentioning above (and that I have used)?

 

Thanks again... 

Yep, it is.

We want a measure that just sums the amount from the GL table.

Total Amount = SUM ( 'YourTable'[Amount] )

Then YTD amount is like this

Amount YTD = 
CALCULATE(
    [Total Amount],
    DATESYTD(Dates[Date] )
)

And rolling 12 is like this

Sales R12 = 
VAR MaxDate = LASTDATE( Dates[Date] )
RETURN
CALCULATE(
    [Total Amount],
    DATESINPERIOD(Dates[Date],MaxDate,-12,MONTH)
)

If you are concerned with the amount showing on dates that have not happened yet (both YTD and Rolling 12 will project past today) take a look at this article describing how to stop the calc from passing today.

https://www.sqlbi.com/articles/hiding-future-dates-for-calculations-in-dax/

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors