Forum Discussion
DAX Help
- 3 years ago
Tejinder , Create a new column
Status =
var _count =
CALCULATE(
COUNTROWS('Table'),
'Table'[Order ID] = earlier('Table'[Order ID]),
'Table'[Received(Y/N)] = "Y"
)
return
IF(
_count = 0, "Missing",
IF(
_count = MAX('Table'[TotalBoxes]), "Completed",
"Partially Completed"
)
)New measure
StatusMeasure =
VAR _date = MAX('Table'[received])
RETURN
CALCULATE(
VALUES('Table'[Status]),
FILTER('Table', 'Table'[received] <= _date)
)
Tejinder , Create a new column
Status =
var _count =
CALCULATE(
COUNTROWS('Table'),
'Table'[Order ID] = earlier('Table'[Order ID]),
'Table'[Received(Y/N)] = "Y"
)
return
IF(
_count = 0, "Missing",
IF(
_count = MAX('Table'[TotalBoxes]), "Completed",
"Partially Completed"
)
)
New measure
StatusMeasure =
VAR _date = MAX('Table'[received])
RETURN
CALCULATE(
VALUES('Table'[Status]),
FILTER('Table', 'Table'[received] <= _date)
)
Thanks for your help
It does not work, here are the screenshots,
The idea is that, i can use a date/time range from a filter. to select a particular window