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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
egrospe17
Frequent Visitor

Delayed posting of financial data based on Accounting books closing date

Hello PowerBI Gods,

I'm trying to put together a P&L dashboard and one of the components is showing Revenue, direct costs, operating costs and gross profit. My report is directly connected to a SQL database so it pulls latest data on a daily basis. We have a schedule when we close our books for the prior month. Currently, if i plot the data, in a chart, it will show months that aren't closed yet per the schedule. How am i able to tell PowerBI to "hide" the corresponding month's financial data until 1 day after the closing schedule?

 

Financial data looks something like this:

Posting PeriodExpense Code Amount 
Jan-24400 - Revenue $           3,000,000.00
Jan-24500 - Direct Cost $             (200,000.00)
Jan-24600 - Operating Cost $             (180,000.00)
Feb-24400 - Revenue $           3,500,000.00
Feb-24500 - Direct Cost $             (350,000.00)
Feb-24600 - Operating Cost $             (180,000.00)
Mar-24400 - Revenue $           5,000,000.00
Mar-24500 - Direct Cost $             (300,000.00)
Mar-24600 - Operating Cost $             (180,000.00)
Apr-24400 - Revenue $           6,000,000.00
Apr-24500 - Direct Cost $             (500,000.00)
Apr-24600 - Operating Cost $             (180,000.00)
May-24400 - Revenue $           3,000,000.00
May-24500 - Direct Cost $             (150,000.00)
May-24600 - Operating Cost $             (180,000.00)
Jun-24400 - Revenue $           8,000,000.00
Jun-24500 - Direct Cost $         (1,000,000.00)
Jun-24600 - Operating Cost $             (180,000.00)
Jul-24400 - Revenue $           4,000,000.00
Jul-24500 - Direct Cost $             (350,000.00)
Jul-24600 - Operating Cost $             (250,000.00)
Aug-24400 - Revenue $               200,000.00
Aug-24500 - Direct Cost $               (20,000.00)
Aug-24600 - Operating Cost $                                 -  

 

Closing Schedule

IDMonthClosing Schedule
1Dec-231/15/2024
2Jan-242/14/2024
3Feb-243/14/2024
4Mar-244/12/2024
5Apr-245/14/2024
6May-246/14/2024
7Jun-247/12/2024
8Jul-248/13/2024
9Aug-249/16/2024
10Sep-2410/14/2024
11Oct-2411/14/2024
12Nov-2412/13/2024

 

With the example data above, the end goal is to only show financial data from Jan-24 to Jun-24. Come 8/14/2024, I would like for the July-24 data to show. Obviously, any future months (if any data available) should not show as well. Below is the sample of how i would like it too look like

 

egrospe17_0-1723139809592.png

 

Any help would be appreciated, thanks!

 

Emmanuel

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@egrospe17,

 

There are various ways to achieve this. If your model has a date table (recommended), you can adapt this solution to use the date table.

 

Relationship:

 

DataInsights_0-1723145249419.png

 

Calculated column in Financial Data table:

 

Closed Period = 
VAR vToday =
    TODAY ()
VAR vCloseDate =
    RELATED ( 'Closing Schedule'[Closing Schedule] )
VAR vResult =
    IF ( vCloseDate <= vToday, 1, 0 )
RETURN
    vResult

 

Measure:

 

Amount Closed Periods = 
CALCULATE ( SUM ( 'Financial Data'[Amount] ), 'Financial Data'[Closed Period] = 1 )

 

Result:

 

DataInsights_1-1723145348152.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

@egrospe17,

 

There are various ways to achieve this. If your model has a date table (recommended), you can adapt this solution to use the date table.

 

Relationship:

 

DataInsights_0-1723145249419.png

 

Calculated column in Financial Data table:

 

Closed Period = 
VAR vToday =
    TODAY ()
VAR vCloseDate =
    RELATED ( 'Closing Schedule'[Closing Schedule] )
VAR vResult =
    IF ( vCloseDate <= vToday, 1, 0 )
RETURN
    vResult

 

Measure:

 

Amount Closed Periods = 
CALCULATE ( SUM ( 'Financial Data'[Amount] ), 'Financial Data'[Closed Period] = 1 )

 

Result:

 

DataInsights_1-1723145348152.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Worked like a charm!! TYSM!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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