Forum Discussion
donalmcnamee2
4 years agoNew Member
Using DATESBETWEEN and FILTER
Hi, I have two unrelated tables: Fuel Purchases Days Worked The Fuel Purchases table records the date a vehicle refuled as well as the date it was previously refuled. The table Days Worke...
- 4 years ago
Hi,
did you create the column or measure ?
I did the column and it worked.
Appreciate your Kudos
- 4 years ago
Hi,
This calculated column formula works
Column = CALCULATE(COUNT('Days Worked'[Date]),FILTER('Days Worked','Days Worked'[Vehicle Registration]=EARLIER('Fuel Purchases'[Vehicle Registration])&&'Days Worked'[Date]>=EARLIER('Fuel Purchases'[Last Fuel Purchase Date])&&'Days Worked'[Date]<=EARLIER('Fuel Purchases'[Fuel Purchase Date])&&'Days Worked'[Has the vehicle worked today?]=TRUE()))Hope this helps.
Ashish_Mathur
4 years agoSuper User
Hi,
This calculated column formula works
Column = CALCULATE(COUNT('Days Worked'[Date]),FILTER('Days Worked','Days Worked'[Vehicle Registration]=EARLIER('Fuel Purchases'[Vehicle Registration])&&'Days Worked'[Date]>=EARLIER('Fuel Purchases'[Last Fuel Purchase Date])&&'Days Worked'[Date]<=EARLIER('Fuel Purchases'[Fuel Purchase Date])&&'Days Worked'[Has the vehicle worked today?]=TRUE()))
Hope this helps.
donalmcnamee2
4 years agoNew Member
- Ashish_Mathur3 years agoSuper User
You are welcome.