MicrosoftLearning / PL-300-Microsoft-Power-BI-Data-Analyst

https://microsoftlearning.github.io/PL-300-Microsoft-Power-BI-Data-Analyst/
MIT License
488 stars 368 forks source link

[BUG] (Non-breaking) Incorrect information regarding data types on lab02 #169

Closed SDSTony closed 1 year ago

SDSTony commented 1 year ago

Priority

Non-breaking

Lab/Demo Number/Name

02-load-data-with-power-query-in-power-bi-desktop

Describe the bug

On task 7 - step 10, it says The fixed decimal number data type stores values with full precision, and so requires more storage space that decimal number.

However, fixed decimal numbers does not always require more storage space than decimal numbers. In fact, if we use the columns from the lab as an example, Cost, Sales, and Unit Price columns require less storage space to store if it is in fixed decimal number type compared to the decimal number.

Above images are from the result of the VertiPaq Analyzer in DAX Studio. We can see that same columns in fixed decimal number (data type in decimal) requires less storage space compared to decimal number (data type in double) due to less precision. (Fixed decimal number only stores up to 4 digits to the right of decimal point.)

Screenshots

image

To Reproduce

N/A

Expected behavior/Suggested Change

Either delete the sentence, or edit it along the lines of The fixed decimal number data type stores fixed 4 digits to the right of the decimal point, so it generally requires less storage space than decimal number, which can have decimal separator anywhere in the number.

Additional context

Reference:

  1. https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-data-types#decimal-number
  2. https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-data-types#fixed-decimal-number
  3. https://learn.microsoft.com/en-us/analysis-services/tabular-models/data-types-supported-ssas-tabular?redirectedfrom=MSDN&view=asallproducts-allversions#bkmk_data_types

Note: To share feedback for the slides, please use the MCT Courseware Forum.

arnoldvilleneuve commented 1 year ago

Nicely pointed out Tony.  Arnold Villeneuve 613-833-0984

On Monday, March 13, 2023 at 10:49:47 a.m. EDT, Tony (Sungjin) Ahn ***@***.***> wrote:  

Priority

Non-breaking

Lab/Demo Number/Name

02-load-data-with-power-query-in-power-bi-desktop

Describe the bug

On task 7 - step 10, it says The fixed decimal number data type stores values with full precision, and so requires more storage space that decimal number.

However, fixed decimal numbers does not always require more storage space than decimal numbers. In fact, if we use the columns from the lab as an example, Cost, Sales, and Unit Price columns require less storage space to store if it is in fixed decimal number type compared to the decimal number.

Above images are from the result of the VertiPaq Analyzer in DAX Studio. We can see that same columns in fixed decimal number (data type in decimal) requires less storage space compared to decimal number (data type in double) due to less precision. (Fixed decimal number only stores up to 4 digits to the right of decimal point.)

Screenshots

To Reproduce

N/A

Expected behavior/Suggested Change

Either delete the sentence, or edit it along the lines of The fixed decimal number data type stores fixed 4 digits to the right of the decimal point, so it generally requires less storage space than decimal number, which can have decimal separator anywhere in the number.

Additional context

Reference: https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-data-types#decimal-number

Note: To share feedback for the slides, please use the MCT Courseware Forum.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

AngieRudduck commented 1 year ago

@SDSTony Thanks Tony for this note, I appreciate the level of detail you provided to support the issue!

I agree that the verbiage should be updated if the experience you shared is always the case. I also think that most candidates for the PL-300 course and certification are not yet at the level you are sharing here. While they may know to use one data type over the other, DAX Studio is out of scope for the curriculum.

I'll validate the data types and review the verbiage to reflect in a coming update. Thanks again!

SDSTony commented 1 year ago

@AngieRudduck Hello Angie, thanks for reviewing this issue.

I agree that DAX Studio should be out of the scope for the curriculum, and I'm not trying to suggest that we should add it into the PL-300 courseware.

The reason I brought up the screenshots of DAX Studio is to share the references which show that fixed decimal data types need less storage space than compared to decimal data types.

Fixed decimal data types will only keep up to 4 digits after the decimal point and will truncate anything that comes after. So it will indeed need less storage space than decimal data type which can store all the decimal points up to 15 digits max after the decimal point.

The reason I'm creating this issue is because in module 6, when we talk about optimizing model performance, one of the methods for optimization is to use the appropriate data types. Because the storage space concept for data types is currently incorrectly addressed in the instructions of this this lab, learners can get confused in module 6, thinking fixed decimal will use more space than decimal data type.

Thanks and let me know if you need additional info!

AngieRudduck commented 1 year ago

Sorry for the delay. After review, the storage reference is misleading in this section. I've updated it to be more about the precision of fixed decimal.

The fixed decimal number data type allows for 19 digits, and allows for more precision to avoid rounding errors. It’s important to use the fixed decimal number type for financial values, or rates (like exchange rates).