Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I want to find out the Reorder rate Measure in the following table.
The Logic Reorder rate Measure is as follows,
for week no 2: Re Ordered Outlets in week 2 / No of Unique Outlets in previous week i.e week 1, (600/1110) *100 = 55%
for week no 3: Re Ordered Outlets in week 3 / No of Unique Outlets in previous week i.e week 2, (1280/1700) *100 = 76%
for week no 4: Re Ordered Outlets in week 4 / No of Unique Outlets in previous week i.e week 3, (1610/1950) *100 = 83%
for week no 5: Re Ordered Outlets in week 5 / No of Unique Outlets in previous week i.e week 4, (2010/2800) *100 = 72%
Thanks
@Anonymous , You can work like
This Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week ]=max('Date'[Week ])))
Last Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week ]=max('Date'[Week ])-1))
But prefer week rank, else it will not work across year
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1 //Monday Week
or
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],1)+1 //Sunday Week
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
This Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
refer
https://www.youtube.com/watch?v=7Jc3D4iaTqs
Hi @amitchandak
The below last week formulae working fine on normal sum but when use this formulae over cumulative sum it not working.
Last Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week ]=max('Date'[Week ])-1))
Thank you.
Cumulative till last week
Cumm Last Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week ]<=max('Date'[Week ])-1))
Hi @Anonymous
You can create a calculated column in the table you show:
Reorder Rate =
VAR previousweek_ = Table1[week No] - 1
VAR uniqueOutletsPreviousWeek_ =
CALCULATE (
DISTINCT ( Table1[No of Unique Outlets] ),
Table1[Week No] = previousweek_,
ALL ( Table1 )
)
RETURN
100 * DIVIDE ( Table1[Re Ordered Outlets], uniqueOutletsPreviousWeek_ )
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers
Hi @Anonymous ,
You need to use a measure similar to this one:
Reorder Date =
Var week_selected = SELECTEDVALUE (Table[Week])
Return
DIVIDE(SUM(Table[UniqueOutletes]); CALCULATE(SUM(Table[Re Orderred Outlets); FILTER(ALL(Table[Week]);Table[Week] = week_selected -1))
You may need to change the sum to a count or distintct count depending on your model settinsgs
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |