Forum Discussion
Date calculation - empty fields
- 6 years ago
Hi srdjanmish ,
The reason for the blank value is that your dateslicer also filters the original table. Please refer to the measure below:
MeasureDifference = VAR MaxSelectedDate = CALCULATE ( MAX ( 'Calendar'[Date] ), ALLSELECTED ( 'Calendar' ) ) RETURN CALCULATE ( DATEDIFF ( MAX ( 'Datatable1'[DueDate] ), MaxSelectedDate, DAY ), CROSSFILTER ( 'Datatable1'[Document date], 'Calendar'[Date], NONE ) )If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Sorry, I tried as a column (without MAX on columnd DueDate), and as a measure (with MAX)...
As a measure, it shows good value, but still, on number of rows i get blank value, and DueDate exists...
Image:
Hi srdjanmish ,
The reason for the blank value is that your dateslicer also filters the original table. Please refer to the measure below:
MeasureDifference =
VAR MaxSelectedDate =
CALCULATE ( MAX ( 'Calendar'[Date] ), ALLSELECTED ( 'Calendar' ) )
RETURN
CALCULATE (
DATEDIFF ( MAX ( 'Datatable1'[DueDate] ), MaxSelectedDate, DAY ),
CROSSFILTER ( 'Datatable1'[Document date], 'Calendar'[Date], NONE )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
- srdjanmish6 years agoHelper I
Thx v-deddai1-msft ,
Somewhere in back of my brain i was aware of that filter rule, but, did not use that part of brain, obviously...
Thx again, problem solved, and solution accepted...