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
Hello!
I've run into a problem trying to make the following measure cumulative. The first screenshot shows my current output, and the part in the red box is what I want as an output. The week date range is a calculated column based on my Date Table.
The user needs to be able to set the date range in the slicer.
Weekly Spend Goal =
var daysInPeriuod = CALCULATE(COUNT('Date'[Date]))
var allDays = COUNTX(ALLSELECTED('DateTable'[Date]), DateTable[Date])
var weeklyAmt = DIVIDE(1000, allDays) * daysInPeriuod
return weeklyAmt
Screenshot 1 showing my current output & desired output
Screenshot 2: the date table
Thanks in advance for any help.
Solved! Go to Solution.
Try this...
Spend Goal (Tier 1) =
VAR LastDateInRange = MAXX(ALLSELECTED('Date'),'Date'[Date])
VAR FirstDateInRange = MINX(ALLSELECTED('Date'),'Date'[Date])
VAR AllDays =
COUNTROWS(
FILTER(
ALLSELECTED('Date'),
'Date'[Date]>=FirstDateInRange &&
'Date'[Date] <= LastDateInRange
)
)
VAR DIP =
COUNTROWS(
FILTER(
ALLSELECTED('Date'),
'Date'[Date]>=FirstDateInRange &&
'Date'[Date] <= MAXX('Date','Date'[Date])
)
)
RETURN DIVIDE(1000,AllDays)*DIP
Try this...
Spend Goal (Tier 1) =
VAR LastDateInRange = MAXX(ALLSELECTED('Date'),'Date'[Date])
VAR FirstDateInRange = MINX(ALLSELECTED('Date'),'Date'[Date])
VAR AllDays =
COUNTROWS(
FILTER(
ALLSELECTED('Date'),
'Date'[Date]>=FirstDateInRange &&
'Date'[Date] <= LastDateInRange
)
)
VAR DIP =
COUNTROWS(
FILTER(
ALLSELECTED('Date'),
'Date'[Date]>=FirstDateInRange &&
'Date'[Date] <= MAXX('Date','Date'[Date])
)
)
RETURN DIVIDE(1000,AllDays)*DIP
Hey thank you!
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 |
---|---|
123 | |
86 | |
73 | |
58 | |
52 |
User | Count |
---|---|
197 | |
133 | |
107 | |
69 | |
65 |