Forum Discussion
Filter
Thanks Angelia. I actually wanted to do do it for each month and the solution you have provided is doing cumulative for all months i.e adding 31st Jan to 1st Feb. I wanted it to be like do it up to 31st Jan and then if month(previous)!=month(current) then take it a sit is and after that from 2nd of Feb add 1st Feb value to it. But anyways, I got the solution of this problem.
Hi unnati,
I am very happy you have resolved your problem, please share your solution or mark corresponding replay as answer.
Best Regards,
Aneglia
- unnati9 years agoFrequent Visitor
I have taken the date filter for before dates, i.e. now the whole data set upto a selected date will be considered but I have written measure
for Today's quantity
Units Sold=CALCULATE(COUNTROWS(tablename), FILTER(tablename,tablename[date] =MAX(tablename[date]))
for MTD,
MTD = CALCULATE(COUNTROWS(tablename), FILTER(tablename,MONTH(tablename[date])= MONTH(MAX(tablename[date]) &&YEAR('tablename[date])=YEAR(MAX(tablename[date]))&&DAY(tablename[date])>=1)