March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a price table like the below, which are connected to my calendar table through the field Activationdate in my fact table.
I would like to have the priceamountacc to be the same for each day until a new price is entered for a certain date
09-03-2023 1,88
10-03-2023 1,88
11-03-2023 1,88
....
04-04-2023 1,81
05-04-2023 1,81
etc...
I have tried the following which is actually working on a SSAS Tabular Cube, but when trying to deploying it to a Power BI Dataset it does not work - any help is appreciated
LatestPrice:=
VAR MaxDate = MAX('Calendar'[Date])
VAR LatestClosingValue = CALCULATE(LASTNONBLANK(Fct_UnitPriceTransactions[PriceAmountAcc], 1),
ALLEXCEPT('Calendar','Calendar'[Date] ), 'Calendar'[Date] <= MaxDate)
RETURN LatestClosingValue
Try
Latest Price =
VAR MaxDate =
MAX ( 'Calendar'[Date] )
VAR LastRow =
INDEX (
1,
SUMMARIZE (
Fct_UnitPriceTransactions,
Fct_UnitPriceTransactions[PriceAmountAcc],
Fct_UnitPriceTransactions[Activation date]
),
ORDERBY ( Fct_UnitPriceTransactions[Activation date], DESC )
)
VAR LastPrice =
SELECTCOLUMNS ( LastRow, Fct_UnitPriceTransactions[PriceAmountAcc] )
RETURN
LastPrice
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |