Forum Discussion
Anonymous
1 year agoNot applicable
Help with pulling in formula using Swith function
I have case where I have created buckets to indicatite where a rolling 6-month average of total sales fall in relation to a bonus. So for example, if rolling average of sales are less than 5000, the...
dharmendars007
1 year agoMemorable Member
Hello Anonymous
Please create a rolling average measure first for each agent and then pass this measure to switch condition.
Rolling6MonthTotalSales =
CALCULATE(SUM(Sales[Amount]),
DATESINPERIOD(Sales[Date],MAX(Sales[Date]),-6,MONTH))
PercentageBucket =
SWITCH(TRUE(),
[Rolling6MonthTotalSales] <= 5000, 0.5,
[Rolling6MonthTotalSales] > 5000 && [Rolling6MonthTotalSales] <= 10000, 0.6,
[Rolling6MonthTotalSales] > 10000, 0.7,0)
If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes 👍 are much appreciated!
Thank You
Dharmendar S
Anonymous
1 year agoNot applicable
Also the 'exceptioncheck' in that SWITCH is to account for two agents that automatically have a fixed percentage