Forum Discussion
Slicer Date Range
Hi Anonymous ,
You can try the following,
PreviousDaySales = CALCULATE(SUM(Table[SALES]),Filter(Table,Date = DATEADD(Table[Date],-1,DAY))
Hi Ani,
Could You please write dax for following Scenrio.
if i select multiple dates as above slicer(i.e 4/4/2019 to 4/30/2019) i need latest sales quantity as from 4/3/2019 to 4/30/2019 and if i select single date(i.e 4/4/2019 to 4/4/2019) i need sales quantity from 4/3/2019 to 4/4/2019.
if i select multiple dates as above slicer(i.e 4/4/2019 to 4/30/2019), i need latest count of items as latest date(i.e 4/30/2019) item count and previous count of items as previous date(i.e 4/3/2019) item count and if i select single date(i.e 4/4/2019 to 4/4/2019) i need bothe latest and previous itemcount as 4/4/2019.
Thank You
Ani1991 wrote:Hi Anonymous ,
You can try the following,
PreviousDaySales = CALCULATE(SUM(Table[SALES]),Filter(Table,Date = DATEADD(Table[Date],-1,DAY))
Ani1991 wrote:Hi Anonymous ,
You can try the following,
PreviousDaySales = CALCULATE(SUM(Table[SALES]),Filter(Table,Date = DATEADD(Table[Date],-1,DAY))
- v-yuta-msft7 years ago
Community Support
Anonymous ,
"if i select multiple dates as above slicer(i.e 4/4/2019 to 4/30/2019), i need latest count of items as latest date(i.e 4/30/2019) item count and previous count of items as previous date(i.e 4/3/2019) item count and if i select single date(i.e 4/4/2019 to 4/4/2019) i need bothe latest and previous itemcount as 4/4/2019."
Could you please explain the requirement above? If possible, share some sample and expected result per condition.
Regards,
Jimmy Tao
- Ani19917 years ago
Resolver III
Hi Anonymous
I was not able to get your second statement correctly. If you can share some sample data that would be helpful for us to help you further.Thanks,
Ani