Forum Discussion
unnati
9 years agoFrequent Visitor
Filter
I have a sales table with created_date column and other transactional data of customers. In my reports, I want a particular's day sales, MTD sales and Target sales. whenever I apply a filter of crea...
v-huizhn-msft
9 years agoMicrosoft Employee
Hi unnati,
I am very happy you have resolved your problem, please share your solution or mark corresponding replay as answer.
Best Regards,
Aneglia
unnati
9 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)