Forum Discussion

celchar98's avatar
celchar98
Regular Visitor
3 years ago

created and deleted id between a date range

I have this table loaded in Power BI. I want to create a DAX measure that reflects the following:

June 1- 5 dataflows created- 0 deleted

June 2 - no new dataflows created- 0 deleted

June 3- no new dataflows created- 0 deleted

june 4- 1 new dataflow created- 3 deleted

june 5 - 0 new dataflows created- 1 deleted

So between june 1 and june 5, 6 dataflows were created and 4 were deleted 
Please can someone help!! very appreciated. I want this logic to hold as I add more data.

2 Replies

  • celchar98's avatar
    celchar98
    Regular Visitor

    Thank you for your reply. 
    Here is the file I am working with. 
    I want to know how many dataflows were created and deleted daily. 

    So I want the DAX to return the following:

    On June 1:
    5 dataflows created
    0 deleted

     

    On June 2:
    no new dataflows were created ( because there is no new id that appeared compared to yesterday ) 
    0 deleted

    On June 3
    no new dataflows created
    0 deleted

    On june 4
    1 new dataflow created ( df 6) 
    3 deleted

    On june 5 
    0 new dataflows created

    1 deleted

    So between june 1 and june 5, 6 dataflows were created and 4 were deleted 

    Dataflow IDDataflow Scan IDDataflow NameDataflow scan dateWorkspace IDWorkspace Name 
    Df145078 Df1States6/1/2023Wk1Carla Workspace 
    Df245078 Df2Hospitals6/1/2023Wk1Carla Workspace 
    Df145079 Df1States6/2/2023Wk1Carla Workspace 
    Df345078 Df3Cases6/1/2023Wk1Carla Workspace 
    Df245079 Df2Hospitals6/2/2023Wk1Carla Workspace 
    Df145080 Df1States6/3/2023Wk1Carla Workspace 
    Df145081 Df1States6/4/2023Wk1Carla Workspace 
    Df245080 Df2Hospitals6/3/2023Wk1Carla Workspace 
    Df345079 Df3Cases6/2/2023Wk1Carla Workspace 
    Df345080 Df3Cases6/3/2023Wk1Carla Workspace 
    Df445078 Df4Immigration data6/1/2023Wk2Chris Workspace 
    Df445079 Df4Immigration data6/2/2023Wk2Chris Workspace 
    Df545078 Df5Immigration procedure6/1/2023Wk2Chris Workspace 
    Df545079 Df5Immigration procedure6/2/2023Wk2Chris Workspace 
    Df545080 Df5Immigration procedure6/3/2023Wk2Chris Workspace 
    Df445080 Df4Immigration data6/3/2023Wk2Chris Workspace 
    Df445081 Df4Immigration data6/4/2023Wk2Chris Workspace 
    Df645081 Df6US Immigration Data6/4/2023Wk2Chris Workspace 
    Df645082 Df6US Immigration Data6/5/2023Wk2Chris Workspace 
    Df445082 Df4Immigration data6/5/2023Wk2Chris Workspace