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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Quiny_Harl
Advocate III
Advocate III

More columns or more rows are better for performance?

Hi Pbi folks,

I'm optimizing a report which includes complex measures, similar to the ones in this dax pattern.

My measures uses SWITCH to switch between different columns in the Fact table depending on a selection from a slicer. I'm considering to unpivot the columns in order to avoid using SWITCH. This, of course, will increase the number of rows. So I'm wondering which would be better in terms of performance/loading time:
Scenario 1:
A fact table with 38 columns and 3 million rows.
Scenario 2:
A fact table with 18 columns and 72 million rows?

1 ACCEPTED SOLUTION
v-jianpeng-msft
Community Support
Community Support

Hi, @Quiny_Harl 

Selecting A fact table with 38 columns and 3 million rows in your model will be even better.
To improve performance, we often need to reduce redundant columns and rows.
If adding a few columns can effectively reduce the number of rows, then it will be very helpful for performance. In my 38x50 and 18x100 model tests, when Power query reads the data file, the 38x50 time is significantly better than the 18x100 as shown in the following image:

vjianpengmsft_0-1733276619852.png

Let's take a look at how they perform in visuals:

vjianpengmsft_1-1733276987479.png

vjianpengmsft_2-1733277120320.png

This tells us that if a visual has too many columns, it will lead to slow performance. With 38 columns, don't put all the columns in the same visual at once.

Here are some optimization rules that will help you optimize your model for a good user experience:

Best practice rules to improve your model’s performance | Microsoft Power BI Blog | Microsoft ...

vjianpengmsft_3-1733277356668.png

 

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Quiny_Harl
Advocate III
Advocate III

@v-jianpeng-msft, thank you for your explanation!
Can you please tell me what does "exclusive duration" mean?

v-jianpeng-msft
Community Support
Community Support

Hi, @Quiny_Harl 

Selecting A fact table with 38 columns and 3 million rows in your model will be even better.
To improve performance, we often need to reduce redundant columns and rows.
If adding a few columns can effectively reduce the number of rows, then it will be very helpful for performance. In my 38x50 and 18x100 model tests, when Power query reads the data file, the 38x50 time is significantly better than the 18x100 as shown in the following image:

vjianpengmsft_0-1733276619852.png

Let's take a look at how they perform in visuals:

vjianpengmsft_1-1733276987479.png

vjianpengmsft_2-1733277120320.png

This tells us that if a visual has too many columns, it will lead to slow performance. With 38 columns, don't put all the columns in the same visual at once.

Here are some optimization rules that will help you optimize your model for a good user experience:

Best practice rules to improve your model’s performance | Microsoft Power BI Blog | Microsoft ...

vjianpengmsft_3-1733277356668.png

 

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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