Forum Discussion
undefined
- Anonymous4 years ago
Thanks for replying, to be very clear so there is a column which is being fetched fromoracle database which contains date values in it as in format of 01-MAY-22 , so dax or custom column has to check each value in the column and has to create a new column where if its today(01-JUL-22) as today similar way today-7 as "last week" etc attaching oracle query which has to be converted to dax or custom column
(ex :
WHEN TO_CHAR(H03_DATE_017,'YYYYMMDD') = TO_CHAR(SYSDATE-1,'YYYYMMDD') THEN 'Yesterday'
WHEN TO_CHAR(H03_DATE_017,'YYYYMMDD') = TO_CHAR(SYSDATE,'YYYYMMDD') THEN 'Today')
Anonymous , Not very clear, You can have column like
Date Type =
SWITCH(TRUE(),
'Date'[Date] = TODAY(), "Today",
'Date'[Date] = TODAY() -1 , "Yesterday",
'Date'[Date] = TODAY() +1 , "Tomorrow",
[Date]& "")
Thanks for replying, to be very clear so there is a column which is being fetched fromoracle database which contains date values in it as in format of 01-MAY-22 , so dax or custom column has to check each value in the column and has to create a new column where if its today(01-JUL-22) as today similar way today-7 as "last week" etc attaching oracle query which has to be converted to dax or custom column
(ex :
WHEN TO_CHAR(H03_DATE_017,'YYYYMMDD') = TO_CHAR(SYSDATE-1,'YYYYMMDD') THEN 'Yesterday'
WHEN TO_CHAR(H03_DATE_017,'YYYYMMDD') = TO_CHAR(SYSDATE,'YYYYMMDD') THEN 'Today')
- amitchandak4 years agoSuper User
Anonymous , you should change the data type to date and the code I have given should work
Or you can create a new date column
date 1= datevalues([Date])
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.