Forum Discussion

SushainKoul's avatar
SushainKoul
Icon for Helper III rankHelper III
5 years ago
Solved

Doubt on Calculated Column, Measures and Content Packs

Hello Guys,

I am just one month old in this Power BI world. I am getting confused with what is the difference between Calculated Column and Measures. Both are created explicitly to perform a calculation so why can't we create just one instead of two. Plz help me. Also what are content packs in power bi is another question which is bothering me a lot.

 

Thank you in advance for your help.

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi  SushainKoul  ,

     

    1. Calculation column/table not support dynamic changed based on filter or slicer. (So sum(table[column]) will return fixed value)
    2. Measure can be affected by filter/slicer, so you can use it to get dynamic summary result.

     

    Scenes:

    This is the data I created:

    1. Use the calculated column to add up all the amounts:

    column = SUM('Table'[amount])

    2. Use measure to add the amount according to the month:

    Measure = CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[month]=MAX('Table'[month])))

    3. When the slicer is used, the measure will change, but the calculated column will not change:

     

    They also have essential differences:

    The calculated column exists in the power bi. After pressing Enter, each row in the table is evaluated immediately, so it will take up memory space

    The measure is a Dax expression, carried out when the visual effects rendering visual impact assessment will be calculated using, it is generally use measure, to release more memory

     

    As a rule of thumb:

    1. If you intend to apply any aggregation to a value (ie. sum, average etc) that shows a result, then stick to a Measure.

    2. If you intend to use the value for formatting purposes (ie. slicers, roe/column category) then add a Column

     

    For specific differences between the two and when to use the two, you can check these links:

    https://projectbotticelli.com/knowledge/dax-calculated-columns-vs-measures-video-tutorial

    https://radacad.com/measure-vs-calculated-column-the-mysterious-question-not

    https://p3adaptive.com/2013/02/when-to-use-measures-vs-calc-columns/

    https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/

     

    Best Regards,

    Liu Yang

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

7 Replies

  • negi007's avatar
    negi007
    Icon for Community Champion rankCommunity Champion

    SushainKoul basisc difference between calcualted columns and measures  

     

    calculated column will create an additional column in your table. there would be a value against each row in the table. Also, adding too many calculated column might also take space in your dataset

     

    measure: it is like a formula which gives you output basis whatever value you supply. Output of measure can change basis filter you apply in your dashboard. This calculation is done on a column basic criteria defined in the measures

     

    below article can give you more details about it.

     

    https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/#:~:text=The%20difference%20is%20the%20context,the%20table%20it%20belongs%20to.&text=In%20fact%2C%20you%20can%20move,one%20without%20losing%20its%20functionality.

     

    Content packs provide a way to share Power BI objects, such as reports, datasets, or dashboards with individuals within your organization. The sharing takes places on the Power BI website and can be shared with just one individual or with multiple groups

     

    https://www.mssqltips.com/sqlservertip/4251/power-bi-enterprise-content-packs/#:~:text=Content%20packs%20provide%20a%20way,individual%20or%20with%20multiple%20groups.

     

    • SushainKoul's avatar
      SushainKoul
      Icon for Helper III rankHelper III

      Thanks for your help. I understood about Content Packs but there is still some confusion between Calculated Column and Measures. I understood that using Calculated Column there would be a value against each row but then same applies to Measures also. Isn't it??

      • negi007's avatar
        negi007
        Icon for Community Champion rankCommunity Champion

        SushainKoul When you create calculated column, you will be able to view its value in the table where it is created. But measure is a aggreated calculation. it will not be visible in a table but it it can be calculated at various aggregation basis filters you apply in your data. For example, same measure can give your total sales at country level as well as Department, region level. You do not have to write seperate measure to get aggregation at different level. in other words, measure is like a dynamic formula with no pre-defined output. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  SushainKoul  ,

     

    1. Calculation column/table not support dynamic changed based on filter or slicer. (So sum(table[column]) will return fixed value)
    2. Measure can be affected by filter/slicer, so you can use it to get dynamic summary result.

     

    Scenes:

    This is the data I created:

    1. Use the calculated column to add up all the amounts:

    column = SUM('Table'[amount])

    2. Use measure to add the amount according to the month:

    Measure = CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[month]=MAX('Table'[month])))

    3. When the slicer is used, the measure will change, but the calculated column will not change:

     

    They also have essential differences:

    The calculated column exists in the power bi. After pressing Enter, each row in the table is evaluated immediately, so it will take up memory space

    The measure is a Dax expression, carried out when the visual effects rendering visual impact assessment will be calculated using, it is generally use measure, to release more memory

     

    As a rule of thumb:

    1. If you intend to apply any aggregation to a value (ie. sum, average etc) that shows a result, then stick to a Measure.

    2. If you intend to use the value for formatting purposes (ie. slicers, roe/column category) then add a Column

     

    For specific differences between the two and when to use the two, you can check these links:

    https://projectbotticelli.com/knowledge/dax-calculated-columns-vs-measures-video-tutorial

    https://radacad.com/measure-vs-calculated-column-the-mysterious-question-not

    https://p3adaptive.com/2013/02/when-to-use-measures-vs-calc-columns/

    https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/

     

    Best Regards,

    Liu Yang

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