Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks ,
Please kindly assist me in writing the below set analysis .
sum({<bank={'Wesbank'},month={">=$(=Month(Today()))<=$(=month(AddMonths(today(),-1)))"}> } DISTINCT if(LatestForPodium ='1' and LatestForState ='1',dicAmount))
I have tried using variable as vCurrentMonth as month(today())
and vPreviousMonth as month(AddMonths(today(),-1))
When I am using this two variable , I tried the below expression -
sum({<bank={'Wesbank'},month={'$(vCurrentMonth)','$(vPreviousMonth)'}> }if(LatestForPodium ='1' or LatestForState ='1',dicAmount))
The sum is not calculating when I am putting the month condition . The months should check current and previous month.
Thanks,
How is your month field created in the script?
Also, did you mean this?
Sum({<bank = {'Wesbank'}, month = {">=$(=Month(AddMonths(Today(), -1)))<=$(=Month(Today()))"}>} DISTINCT if(LatestForPodium = '1' and LatestForState = '1', dicAmount))
Or this
Sum({<bank = {'Wesbank'}, month = {">=$(=Month(AddMonths(Today(), -1)))<=$(=Month(Today()))"}, LatestForPodium = {1}, LatestForState = {1}>} DISTINCT dicAmount)
Month(date_updated) as month
Try the expressions above and see if they work
Maybe adding a space between the months (and switch the start vprev month with the current month. So bigger then last month and equal to current month. Just like stalwar1 mentioned.
sum({<bank={"Wesbank"},month={">=$(=month(AddMonths(today(),-1))) <=$(=Month(Today()))"}> } DISTINCT if(LatestForPodium ='1' and LatestForState ='1',dicAmount))