Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi all,
need help with a DAX formula, please.
I would like to show sum of sales for selected period plus order book data with delivery year = selected delievery year.
I have no issue with the sum of sales, but with the orderbook data.
For example, when user selects this year (2022), everything is fine.
But when user would like to see, what is already in the order book with delivery year in 2023 for example, I don't get expected result but only zero. Seems, I do not have the filters correct. Could you please help me correct? Thanks in advance.
My formula for order book currently is this:
Solved! Go to Solution.
OB =
VAR _lastdate =
CALCULATE ( MAX ( 'Orderbook ACT'[Date] ), ALL ( 'Orderbook ACT' ) )
VAR _recognition_year = SELECTEDVALUE ( 'Calendar'[Year] )
RETURN
CALCULATE (
SUM ( 'Orderbook ACT'[Ext Sales] ),
'Orderbook ACT'[EX/IG] = "EX",
'Orderbook ACT'[Date] = _lastdate,
'Orderbook ACT'[Revenue Rec Year] = _recognition_year,
REMOVEFILTERS('Calendar')
)
OB =
VAR _lastdate =
CALCULATE ( MAX ( 'Orderbook ACT'[Date] ), ALL ( 'Orderbook ACT' ) )
VAR _recognition_year = SELECTEDVALUE ( 'Calendar'[Year] )
RETURN
CALCULATE (
SUM ( 'Orderbook ACT'[Ext Sales] ),
'Orderbook ACT'[EX/IG] = "EX",
'Orderbook ACT'[Date] = _lastdate,
'Orderbook ACT'[Revenue Rec Year] = _recognition_year,
REMOVEFILTERS('Calendar')
)
@Kandidel try:
OB Current Year =
var _lastdate = Calculate(MAX('Orderbook ACT'[Date]), All('Orderbook ACT')) // find latest order book data
return
CALCULATE(SUM('Orderbook ACT'[Ext Sales]),'Orderbook ACT'[EX/IG] ="EX",
'Orderbook ACT'[Date]=_lastdate,'Orderbook ACT'[Revenue Rec Year] = SELECTEDVALUE('Calendar'[Year]))
@Kandidel
Write this:
OB =
VAR _lastdate =
CALCULATE ( MAX ( 'Orderbook ACT'[Date] ), ALL ( 'Orderbook ACT' ) )
RETURN
CALCULATE (
SUM ( 'Orderbook ACT'[Ext Sales] ),
'Orderbook ACT'[EX/IG] = "EX",
'Orderbook ACT'[Date] = _lastdate,
'Orderbook ACT'[Revenue Rec Year] = SELECTEDVALUE ( 'Calendar'[Year] )
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
97 | |
65 | |
45 | |
39 | |
31 |
User | Count |
---|---|
164 | |
111 | |
61 | |
53 | |
38 |