Forum Discussion
Date Function Problem
- 1 year ago
Hi Diportee97
The main issue is calendar table, date column(Date/time data type) having same time for all dates(shows 12:00 AM for all dates). It means whenever you filter the data it will look for same date and time. That's why you can't see the data.
Hence, I changed date column as 'Date' data type only ratherthan Date/time data type in the calendar table and created a new date column with 'Date' data type only in Hosptial_ER table.
Now you can able to see the data. Here I am attching a smaple .pbix file url
https://drive.google.com/file/d/1lTR79-mNM_p46hzSqp5kptNrFA2IrvoI/view?usp=sharing
- Anonymous1 year ago
Hi Diportee97
Thanks for the reply from Murtaza_Ghafoor and ajaybabuinturi .
My suggestion is to create a date column in both the Calendar and Hospital ER tables, and then create a relationship between the two tables based on this column.
Date without time = FORMAT('Hospital ER'[Date], "yyyy-mm-dd")Date without time = FORMAT('Calendar'[Date], "yyyy-mm-dd")Output:
This is done because the time in the calendar table is 12:00am, through my test, if the column with time is used as a slicer, only the data at 12:00am in the Hospital ER table can be filtered.
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
My pbix file
https://drive.google.com/file/d/1cAV_OsnCk-IH8Le0TMe6PnQSXQ1JGIdg/view?usp=drivesdk
My dashboard link
- ajaybabuinturi1 year ago
Super User
Hi Diportee97
The main issue is calendar table, date column(Date/time data type) having same time for all dates(shows 12:00 AM for all dates). It means whenever you filter the data it will look for same date and time. That's why you can't see the data.
Hence, I changed date column as 'Date' data type only ratherthan Date/time data type in the calendar table and created a new date column with 'Date' data type only in Hosptial_ER table.
Now you can able to see the data. Here I am attching a smaple .pbix file url
https://drive.google.com/file/d/1lTR79-mNM_p46hzSqp5kptNrFA2IrvoI/view?usp=sharing
- Anonymous1 year agoNot applicable
Hi Diportee97
Thanks for the reply from Murtaza_Ghafoor and ajaybabuinturi .
My suggestion is to create a date column in both the Calendar and Hospital ER tables, and then create a relationship between the two tables based on this column.
Date without time = FORMAT('Hospital ER'[Date], "yyyy-mm-dd")Date without time = FORMAT('Calendar'[Date], "yyyy-mm-dd")Output:
This is done because the time in the calendar table is 12:00am, through my test, if the column with time is used as a slicer, only the data at 12:00am in the Hospital ER table can be filtered.
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.