Forum Discussion
Anonymous
6 years agoNot applicable
Need a measure
Hi, I have to calculate a measure which should be based on the following logic: if "weekend date" = in between ("quarter start date" and "quarter end date") then "Total Hours" else "0" Note:...
- 6 years ago
Anonymous ,
Create a measure using dax as below:
Result = IF(MAX('Table'[weekend date]) >= MAX('Table'[Quarter Start Date]) && MAX('Table'[weekend date]) <= MAX('Table'[Quarter End Date]), MAX('Table'[Total Hours]), 0)Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
6 years agoNot applicable
Hi,
I believe this would be more clear:
| weekend date | Quarter Start Date | Quarter End Date | Total Hours | (Required Measure) |
| 2/23/2020 | 1/6/2020 | 4/5/2020 | 140 | 140 |
| 5/20/2020 | 4/6/2020 | 7/5/2020 | 89 | 89 |
| 1/2/2020 | 4/6/2020 | 7/5/2020 | 123 | 0 |
| 6/8/2020 | 1/6/2020 | 4/5/2020 | 88 | 0 |
| 3/12/2020 | 1/6/2020 | 4/5/2020 | 212 | 212 |
az38
6 years agoCommunity Champion
Anonymous
Measure=
var _weekendDate = SELECTEDVALUE(Table[weekend date])
IF(_weekendDate >= SELECTEDVALUE(Table[quarter start date]) && _weekendDate <= SELECTEDVALUE(Table[quarter end date]), Table[TotalTime], 0)