dataflow - filter - for up to and including yesterday

arkiboys 9,646 Reputation points

I am passing date parameter to dataflow.
dataflow contains two filters.
in filter1 --> equals(year(toDate(BUDAT,'yyyyMMdd')),year(currentUTC()))
in filter2, I am making sure the month in dataset is for the previous month to the date I am passing into the dataflow as follows

equals(month(toDate(busColName,'yyyyMMdd')), month(addMonths(toDate($p_CurrentDate, 'yyyy-MM-dd'),-1)))

Now I would like to make sure the dataset contains data from the beginning of the previous month up-to and including the previous DAY?
How do I do this?
thank you

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,724 questions
{count} votes

Accepted answer
  1. HimanshuSinha-msft 19,381 Reputation points Microsoft Employee

    Hello @arkiboys ,
    Thanks for the question and using MS Q&A platform.
    As we understand the ask here is use the more complocated expression in the filter clause whcih can take care of the BETWEEN , please do let us know if its not accurate.
    We can use the a complicated the expression , but I think we can achioave this by using two FILTER activity . First filter activity will filter data with the logic

    Filter 1
    SomeDate < todaysdate() -1

    Filter 2
    Some > 01-lastmonth-thisyear ( 01-09-2022)

    To me I think this is a very simple solution , let me know if you need an working copy , happy to share .

    Please do let me if you have any queries.

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
      • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

0 additional answers

Sort by: Most helpful