Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
vipett
Helper II
Helper II

Crossjoin in PowerBI or SQL - Performance?

I have a report where I calculate the stock backwards (and projected forwards), for this I use a Cross join between my items table and calendar table.

However, it is quite a lot of data.. three years of history is needed and ~16000 articles, so in total 16 million rows..

 

When I do the cross join in PowerBI the performance in PowerBI desktop becomes really slow, If I want to add a new column, I have to wait ~30 seconds before typing and then 30-60 before I see the output..

Would it be smarter to do the cross join in the import? Of course the load will take much longer.

Or are there any other ways?

I need the Cartesian product unfortunately..

2 REPLIES 2
vipett
Helper II
Helper II

Hi, 

 

No not really..

I use a table with the Cartesian product of all dates and all items.

Then I link this to my transactions table (all movements, PO inbound, SO outbound, stock correction, etc.) Plus my forecast transcation tabel 

Based on this, I calculate what the stock was each day and what stock level I have estimated it to be each day going forward. 

amitchandak
Super User
Super User

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.