Forum Discussion
Create calculated column with datesbetween
- Anonymous4 years ago
Hi OPS-MLTSD ,
DATESBETWEEN() returns a table that contains a column of dates that begins with a specified start date and continues until a specified end date.
This function is suited to pass as a filter to the CALCULATE function. Use it to filter an expression by a custom date range.
So you may try:
50000 Earning = var _sum= CALCULATE(SUM(Clients[Wage]),DATESBETWEEN('Clients'[STARTDATE],MIN('fiscal Year'[Date]), MAX('fiscal Year'[Date]))) return SWITCH(TRUE(),[Currently_working]="Yes"&&_sum>=50000,"Yes","No")Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi OPS-MLTSD ,
DATESBETWEEN() returns a table that contains a column of dates that begins with a specified start date and continues until a specified end date.
This function is suited to pass as a filter to the CALCULATE function. Use it to filter an expression by a custom date range.
So you may try:
50000 Earning =
var _sum= CALCULATE(SUM(Clients[Wage]),DATESBETWEEN('Clients'[STARTDATE],MIN('fiscal Year'[Date]), MAX('fiscal Year'[Date])))
return SWITCH(TRUE(),[Currently_working]="Yes"&&_sum>=50000,"Yes","No")
Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- OPS-MLTSD4 years agoPost Patron
thank you so much! it worked!