The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all,
I want to build a calendar table which will have dates from Order date column in Order table.
Order date column will have uneven dates , like it may have April 1,2,3, but may not 4, some dates will be missing
and in some cases some months in some years will also be missing
Please help
Thanks in advance
Solved! Go to Solution.
Hi @Anonymous ,
you can create a date table based on your order table like that;
Date Table= CALENDAR(MIN('order'[date]),MAX('order'[date]))
then if you generate relationship between Date Table[date] and order[date] by both direction, you can reach your target.
Hi @Anonymous ,
I'm a little confused about your needs, Could you please explain them further? It would be good to provide a screenshot of the results you are expecting and desensitized example data.
Thanks for your efforts & time in advance.
Best regards,
Community Support Team_Binbin Yu
Hi @Anonymous ,
When creating standart date table by dax, we need to make some edition on it. Below code, I added two line codes apart from classic date tabe dax. Let me mark them with bold format.
First , I created "Selection" column in order to filter uneven day number, and I used "Mod" function. If Mod(number,2)=1 , it means number is uneven.
Then, I filtered out this uneven day numbers like selection=1.
I am adding final result of data as image at below. Please follow the day number column in the image, which is your target.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @OguzMavice
My order date has years like in below picture
if I select only 2008, it have only date 3/31/2008 that's it
So I just want to show whatever dates in Order date in Calendar table
Please reply,
Thanks
Hi @Anonymous ,
you can create a date table based on your order table like that;
Date Table= CALENDAR(MIN('order'[date]),MAX('order'[date]))
then if you generate relationship between Date Table[date] and order[date] by both direction, you can reach your target.