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 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:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
21 | |
17 | |
16 | |
11 | |
7 |
User | Count |
---|---|
26 | |
25 | |
12 | |
12 | |
12 |