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
charleshale
Responsive Resident
Responsive Resident

Obvious problem I must be missing on VAR + Dates to sum trial balances only since start of year

Trial balances in financial statements need to reset every year to sum correctly.

 

So if the trial balances are for a cash account

DATE           TRIAL BALANCE

Dec 2019     $200

Jan 2020      $100

Feb 2020      $-50

Then the proper cash balance at 2/28/2020 would be $50     ($100 - $50)

 

Can anyone see why the following  VAR date filters aren't capturing the above with a date table DimDate?

VAR _LastDate = MAX(DimDate[Date])
Var _StartofYear = STARTOFYEAR(DimDate[Date])
RETURN
CALCULATE(
sum( //trial balance column//,
FILTER(
ALL(DimDate),
_LastDate <= _StartofYear))
 
 
1 ACCEPTED SOLUTION
charleshale
Responsive Resident
Responsive Resident

Figured out my own question -- needs a double trigger

 

 

CALCULATE(//measure//),
FILTER(
ALL(DimDate),
DimDate[Date] <= _LastDate && DimDate[Date] >= _StartofYear)
),

View solution in original post

1 REPLY 1
charleshale
Responsive Resident
Responsive Resident

Figured out my own question -- needs a double trigger

 

 

CALCULATE(//measure//),
FILTER(
ALL(DimDate),
DimDate[Date] <= _LastDate && DimDate[Date] >= _StartofYear)
),

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.