View My Drafts
Hi Anubhav,I just joined this platform about an hour ago and saw your query.I have worked out the measure to calculate prev month, total count and distinct count.Few changes were made to the date table as I added new columns for Year and Mnth Year to enable better filter.Please do let me know if you have further queries on this and please visit my website at https://powahour.com/. Linkedin https://www.linkedin.com/in/sam-bolade-68718818b/
Use this date table instead.. way better and learn to love the (Currentday), (CurrentMonth), (CurrentYear) columns.
So if you want last months total.. you would just calculate
sum(XXX),filter(dim_date,dim_date[CurrentMonth = -1]))
which means that only records from last month are taken into account when doing the total