Forum Discussion
donalmcnamee2
3 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...
- 3 years ago
Hi,
did you create the column or measure ?
I did the column and it worked.
Appreciate your Kudos
- 3 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.
donalmcnamee2
3 years agoNew Member
That's exactly what I'm looking for!
However, when I try to recreat it, I'm getting a different result to the one you're getting.
It must be something simple as the data set you're using is exactyl the same as mine.
My PIBX can be found here if you would like to take a look: https://dl.archwayproducts.com/downloads/BI/query.pbix
Many thanks!
MahyarTF
3 years agoMemorable Member
Hi,
did you create the column or measure ?
I did the column and it worked.
Appreciate your Kudos
- donalmcnamee23 years agoNew Member
Yes, using a Calclulated Column instead of a Measure worked great.