Forum Discussion
srdjanmish
6 years agoHelper I
Date calculation - empty fields
Hi guys... I have a situation, a problem. I have a Dataset, created from dataflows, that has table (table name: DataTable1) with 2 date fields. One field is for document date, and the other is fo...
- 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
srdjanmish
6 years agoHelper I
This is not good... I need result for each row in DataTable1, difference between Max selected date and DueDate. With this calculation, I get Max(DueDate) and Max selected date difference...
Grand total does not matter, it is not needed...
srdjanmish
6 years agoHelper I
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: