Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I want to divide a sum by the number of months of data that I have in the model.
So in September I have data in my model for Jan-August 2020 so I want to divide a sum by 8.
=Sum({<[DataType]={'Actual'}, YTDFlag={1}>}[Price (SEK)])/Count( distinct [User Id - User])/8
In October, the september data comes in, so then I want to divide my sum by 9.
=Sum({<[DataType]={'Actual'}, YTDFlag={1}>}[Price (SEK)])/Count( distinct [User Id - User])/9
How can I make an automatic calculation the number of months of data that I have in my model?
I am grateful firstly for help with the automation of months and if possible also help with the formula....as I am new maybe I have made a mistake in my formula as well 🙂 (although it seems to work).
Thanks,
Anna.
Thanks so much Anil_Babu_Samineni, I worked out that I could use GetSelectedCount for "Period" and if I have nothing selected then I used Max([Month]). Thanks anyway 🙂
May be
Count({<DateField={">=$(=YearStart(Max(DateField)))<=$(=Max(DateField))"}>} TOTAL MonthField)
Thanks so much Anil_Babu_Samineni, I worked out that I could use GetSelectedCount for "Period" and if I have nothing selected then I used Max([Month]). Thanks anyway 🙂