Forum Discussion
qwaiti27231
8 years agoHelper III
week on week
i need the dax formula for week on week for eg count of order Id with 10/9/2017- count of order with 3/9/2017)/count Of order in 3/9/2017 For eg count of order at 3/9/2017= 32 count of or...
- 8 years ago
You can create a measure like below:
7 days ago value = CALCULATE(SUM(Table5[Value]),FILTER(ALL(Table5),Table5[Date]=MAX(Table5[Date])-7))
Regards,
v-sihou-msft
8 years agoMicrosoft Employee
In this scenario, you must have a Year column and a Week Number column in your table. To compare the current week and previous week. You can create a measure like below:
=
VAR CurrentWeekCountID =
CALCULATE (
COUNTA ( Table[ID] ),
ALLEXCEPT ( Table, Table[Year], Table[WeekNumber] )
)
VAR PreviousWeekCountID =
CALCULATE (
COUNTA ( Table[ID] ),
FILTER (
ALL ( Table ),
Table[Year] = MAX ( Table[Year] )
&& Table[WeekNumber]
= MAX ( Table[WeekNumber] ) - 1
),
ALLEXCEPT ( Table, Table[Year], Table[WeekNumber] )
)
RETURN
( CurrentWeekCountID - PreviousWeekCountID )
/ PreviousWeekCountID
If you still have any question, please share some sample data.
Regards,
qwaiti27231
8 years agoHelper III
should i make week based on year or day???
- qwaiti272318 years agoHelper III
v-sihou-msft it doesnt work
- v-sihou-msft8 years agoMicrosoft Employee
- qwaiti272318 years agoHelper III