Forum Discussion
DateDiff Days giving incorrect result
Hi,
I guess you use Difference as a calculated column, not a measure. As Anonymous said, a calculated column can’t answer the slicer. So you should make some change to the formula and make it as a measure. Please try it.
Difference =
SWITCH (
TRUE (),
MIN ( view_compliance[next reading due by] )
< MAX ( 'Report Generation Date Table'[ReportGeneration] ), DATEDIFF (
MIN ( view_compliance[Next Reading Due by] ),
MAX ( 'Report Generation Date Table'[ReportGeneration] ),
DAY
),
0
)
Best Regards!
Dale
HI Dale
we need to get the duedate ie datediff on everyrow , for each row [next reading due date ] column - userinputdate ( which is same for all rows, this is instaed of today() we are taking some userinpu date , so they want to see that relvant date based on that date).
we are taking ReportGeneration as measure where we are taking max of user input date from slicer.
The issue is Reportgeneration date table and actual fact table are not linked and reportgenration date always taking last date of datedimension. how to use non related measure in different table on row by row basis
- Venkatdevu9 years agoNew MemberSurendrayou need to use lastdate() function in place of max() function as max takes scalar value its not giving date diff
- Surendra_thota9 years agoHelper IIHi Venkat
I have user that last date function also , still San result that is that date of date dimension is coming , some how the selected column is not reflecting in 2 nd table but if we use the same measure in card it is giving selected date, we need to know how use selected date in different table for calculated column- v-jiascu-msft9 years agoMicrosoft Employee
Hi,
Do you mean you want to use slicer to impact the calculated column? There is no way to do that. You have to use a measure and create a report.
Best Regards!
Dale