DaxStudio / DaxStudio

DAX Studio is a tool to write, execute, and analyze DAX queries in Power BI Desktop, Power Pivot for Excel, and Analysis Services Tabular.
http://daxstudio.org
Other
677 stars 143 forks source link

Vertipaq shows incorrect table sizes until you close/reopen Power BI Desktop #448

Closed edhans closed 3 years ago

edhans commented 3 years ago

I have a Date table in this example with 3 fields that are unique, and about 20 fields that are not. The unique fields are Date, DateKey (YYYYMMDD format) and an Index. For the model I was working on I only needed the Date field. So I looked at the metrics

To Reproduce Steps to reproduce the behavior:

  1. Add a date table. You can use this one in Power Query as an example.
  2. Load the table an look at the size. Should be south of 400KB.
  3. Go back in, remove DateKey and DateID
  4. Close and load. Now table will be much larger.

Screenshots This is the date table before removing the 2 unneeded columns. (Ignore the annotation here - screenshot used in another example) image This is the date table after removing the unneeded columns in Power Query. I then hit Close and Apply, then refreshed metadata in DAX Studio just in case, and viewed the metrics: image The table has increased in size 10X. But if I close and reopen Power BI Desktop, It is as expected, a smaller date table. image

Is this a bug in DAX Studio, bad data passed from PBI Desktop until it is closed/reopened, or am I not understanding something about how to view this data?

marcosqlbi commented 3 years ago

The visualization is not updated in real-time every time you modify the model, it would be too expensive. If you click "View Metrics" again the visualization should be updated according to the current state of the model.

edhans commented 3 years ago

When I clicked View Metrics is when it updated to the 5,614,060 size, so it updated, but grew much larger. The only way I could see the expected smaller size was to close and reopen the PBIX file.

marcosqlbi commented 3 years ago

This is by design: you see the memory allocated by the engine, during the refresh it is larger, when you close and open the PBIX file the AS engine restarts and only allocates the exact amount of memory. There is nothing we can do to show the more accurate result. After a refresh, you should always close and open the PBIX file to get accurate results.

edhans commented 3 years ago

Thanks! Wasn't aware of this. Appreciate the follow up on it.