Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to know how much a sales person rebate is MoM.
Sum({$<[Rebate Month] ={"$(=Max(Rebate Month)-1)"}>} [Total kW]) is my code and nothing is returning. What is the reason? Am I missing the Sales in the expression?
Your 'Rebate Month' is a text field, Max function won't work with the text field. The better way to have Month-Year field in your data model and you would need Monthend(Monthyearfield,-1) to go to the previous month.
Can you share small sample of your data or a sample app so that someone can provide more help.
Sounds like I will have to add the Month and year through the data load editor? Is this screenshot better?
Something like this -
Load *,Date(Monthend(Date),'MMM-YYYY') as [Month Year]
inline [
Date, Sales
01/01/2023, 100
01/20/2023, 100
02/05/2023, 150
03/05/2023, 150
04/05/2023, 150
05/05/2023, 150
06/05/2023, 150
07/05/2023, 150
07/15/2023, 1000
07/20/2023, 200
08/10/2023, 2000
];
KPI Expression -
Sum({<[Month Year]={'$(=Date(Monthend(Max([Month Year]),-1),'MMM-YYYY'))'}>}Sales)
Looks like it works but I might've done it wrong?