The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi guys,
I am looking to create a field to show order reserve for the future on each date.
I have got it working by using filters in dax but that does not give me the possibility show it added to a range of dates.
Here is a data sample. I have the first two columns and need to create the third one. I want to mention that the only thing I can use is DAX as the dataset is locked and I cant edit anything.
// Calendar joins on Date to Orders[Date]
// and is the date table in the model
// marked as such.
[Order Count] = COUNTROWS( Orders )
[Orders Reserve] =
var __firstDateInContext = FIRSTDATE( 'Calendar'[Date] )
// Get the total count of orders
// from the first date to the end.
var __result =
CALCULATE(
[Order Count],
// For this to work, 'Calendar' must be
// marked as the Date table in the model
// and has to be a proper date table!
'Calendar'[Date] >= __firstDateInContext
)
return
__result
Best
D
@Anonymous Hi. Thanks for your reply.
I am getting the following error using this formula:
"The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value".
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |