Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Days difference between two date in a measure

Hello Everyone!!

I am trying to calculate a measure in which i am trying to calculate date difference between two coloumns that are present in seperate diffrent tables in star schema. One is date Dimension in which last date of each month is present and the other is accumulating fact table in which dates are present with respect to work flow.
Now what I am trying to do is to get date difference of one date coloumn from fact table to that of data coloumn from date dimension. 
currently i am using this dax farmula

 

DATEDIFF(max('Date dimension'[Date]),SELECTEDVALUE('fact table'[Rc Date]),DAY), ALL('Date dimension'),
'fact table'[Employee Key] in Employee,'fact table'[rc month] >=7 , 'fact table'[rc month]<= MaxDate , 'fact table'[Rcm Date] = BLANK())

which is giving me wrong result
kindly help me out .

1 Reply