Error 1004
Error 1004

Reputation: 8230

Opening Balances functions returns (Blank) - Power BI

All opening balances (Month, Quarter & Year) functions return (Blank) BUT:

Time table & Time hierarchy structure:

enter image description here

enter image description here

Matrix visual:

enter image description here

Calculations:

Any idea what I m missing? Any help will be greatly appreciated!

------------------------------UPDATE------------------------------

After @Sam Nseir comment and a deeper reading on time functions find below my findings:

Upvotes: 0

Views: 182

Answers (1)

Sam Nseir
Sam Nseir

Reputation: 12111

Opening Balance functions are designed for things like inventory, where you have continuous running dates of inventory. Not designed for transactions.

Opening Balance functions actually return the day before that period starts.
OPENINGBALANCEMONTH(...) is the same as PREVIOUSDAY(STARTOFMONTH(...)). So in your case it is getting the sum of the last day of the previous month, and I'm guessing you don't have any transactions then.

I think what you are after is the Previous Functions:

OB Month = PREVIOUSMONTH( SUM(FctTransactions[Units Sold]),DimTime[Date] )
OB Quarter = PREVIOUSQUARTER( SUM(FctTransactions[Units Sold]),DimTime[Date] )
OB Year = PREVIOUSYEAR( SUM(FctTransactions[Units Sold]),DimTime[Date] )

Upvotes: 2

Related Questions