Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I have a sales table, which include all inforamtion of my orders. But in this table, there is now datetime field, we have a column called REQUESTED_DATE_KEY wihch is number format.
And we have anther table call DATE_DIM table, which have the filld called Date_Key which is number too
So we can join REQUESTED_DATE_KEY=Date_Key in order to get the calenday day, then in my sales table, I can filter only for today, becasue I have milloin rows in sales table, so I only want today.
But I don't know how to do this in powerbi in query editor mode, I try to merge those tow tables together, but it taks forever to do.
Do anyone one knows what is the right way to do this?
What method are you using to bring in your Sales table? SQL?
imported. but the sales table didn't has delivery_date, i have a filed called date key, you have to join this date key with the anohter table called date dim, in the date dime, each date key refers calenedar day!
The date key in your table appears to simply be the date in a YYYYMMDD format. If so, then follow these steps:
If you are importing your table via a SQL statement, then you can actually feed today's date into your SQL statement, so you don't have to import the millions of rows first... This would drastically improve your performance. I would just need to know what method you are using to import your table.
Hello,
I used improted method.
In out sales table, we don;t have the date, but we have datekey. we have a calendar table, which stores all the date and with some specila flag, for exmaple, if I want to pull yestreday's order, i use following SQL query
SELECT DATE_DIM.CALENDAR_DATE, SALES_HEADER_FACT.SALE_ID FROM DATE_DIM inner join SALES_HEADER_FACT on DATE_DIM.DATE_KEY=SALES_HEADER_FACT.REQUESTED_DATE_KEY WHERE DATE_DIM.YESTERDAY='Y'
As you can see use Date_Dim to control which days order we pull
Hey @NoobAnalyst01
Since you probably want to keep your full Sales table for other use I would do the following:
Hope this helps,
Parker
Hello,
Parker, what do you mean by:
Sorry, i am new to power bi, i didn;t get your method.
I realized that your Date column you're trying to filter on is in number format. You will need to either change it to a date or create a date column using the Query Editor. You can easily acheive this by clicking Column from Examples and then typing the date format of one of your rows. For example, if the date key is 06252018 you can type 06/25/2018 and it will create a new column with proper dates. When you have this new column, use a date filter like such:
Click on Equals and set the date equal to literally any date you want. Then follow the steps outlined above!
I changed the datekey, it give a error , since it is not date, the datekey joined with another datekey in Date_Dim table, then you can get teh day.
you mean i should type the date fromat i want to my datekey, i did, it gives me: