Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi Guys ,
This is my Table Structure . Here i'm trying to calculate next Three days forecasted sales and my days starts at sunday that is 0 , So everyday need to calculate next three days forecasted sales .Here one problem is their if the day number is 4 need to calculate day 5 and 6 forecasted sales , If the day number is 5 need to calculate day 6 , 0, 1 and this calculation need to roll back with in a week .
i can't find any idea can guys help me out
Solved! Go to Solution.
try to add a column like:
Column =
VAR _date = [date]
VAR _daynumber = [Day Number]
RETURN
SUMX(
FILTER(
data,
WEEKNUM(data[Date])=WEEKNUM(_date)
&&data[Day Number] IN {MOD(_daynumber+1,7), MOD(_daynumber+2,7), MOD(_daynumber+3,7)}
),
data[Forecasted Sales]
)it worked like:
or you plot a table visual with the date column and a measure like:
measure =
VAR _date = MAX(data[date])
RETURN
SUMX(
FILTER(
ALL(data),
data[Date]>_date
&&data[Date] <=_date+3
),
data[Forecasted Sales]
)
it worked like:
Hey Thanks for the Reply , Think like we are in the week of 13 so forested sales should not go outside the 13th week , This measure will work for upto 29th March if the 30 th march comes need to calculate 31 st march , 1st April and 26 th march Forecasted sale , if 31st march need to calculate 1st April , 26th March, 27th March Forecasted sale, if 1st April comes need to calculate 26th , 27th,28th march forecasted sales .
I need to roll up days with in a week itself
or try to plot a table visual with the date column and a measure like:
measure =
VAR _date = MAX(data[date])
VAR _daynumber = MAX(data[Day Number])
RETURN
SUMX(
FILTER(
ALL(data),
WEEKNUM(data[Date])=WEEKNUM(_date)
&&data[Day Number] IN {MOD(_daynumber+1,7), MOD(_daynumber+2,7), MOD(_daynumber+3,7)}
),
data[Forecasted Sales]
)it worked like:
try to add a column like:
Column =
VAR _date = [date]
VAR _daynumber = [Day Number]
RETURN
SUMX(
FILTER(
data,
WEEKNUM(data[Date])=WEEKNUM(_date)
&&data[Day Number] IN {MOD(_daynumber+1,7), MOD(_daynumber+2,7), MOD(_daynumber+3,7)}
),
data[Forecasted Sales]
)it worked like:
Hai, Thanks this works
try to add a column like:
Column =
VAR _date = [date]
RETURN
SUMX(
FILTER(
data,
data[Date]>_date
&&data[Date] <=_date+3
),
data[Forecasted Sales]
)with a simlified dataset:
it worked like:
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |