locked
If statement vs. calculated column RRS feed

  • Question

  • Is there any way that I can make this a measure instead of a calculated column? 
    Tuesday, October 18, 2016 12:52 AM

Answers

  • Hi AlexMartini,

    A calculated column is just like any other column in a table and you can use it in any part of a report. The calculated column are computed during the database processing and then stored in the model. Any reference to a column returns the value of that column for the current row.

    Measures are useful whenever you do not want to compute values for each row but, rather, you want to aggregate values from many rows in a table. Measures are either implicit or explicit, which affects how you use them in a PivotTable or PivotChart, and in other applications that use a Power Pivot Data Model as a data source. An implicit measure is created by Excel when you drag a field to the VALUES area of the PivotTable Fields list.

    If you want to put it on rows, columns, slicers, or report filters, it must be a column. You can’t put a measure in any of these five zones.

    In addition, there is no perfect 100% answer to replace the calculated column instead of measure. They are used in different scenarios, please review this article for more details.

    Best Regards,
    Angelia

    Tuesday, October 18, 2016 9:10 AM

All replies

  • Make what a measure?

    David


    David http://blogs.msdn.com/b/dbrowne/

    Tuesday, October 18, 2016 1:38 AM
  • Hi AlexMartini,

    A calculated column is just like any other column in a table and you can use it in any part of a report. The calculated column are computed during the database processing and then stored in the model. Any reference to a column returns the value of that column for the current row.

    Measures are useful whenever you do not want to compute values for each row but, rather, you want to aggregate values from many rows in a table. Measures are either implicit or explicit, which affects how you use them in a PivotTable or PivotChart, and in other applications that use a Power Pivot Data Model as a data source. An implicit measure is created by Excel when you drag a field to the VALUES area of the PivotTable Fields list.

    If you want to put it on rows, columns, slicers, or report filters, it must be a column. You can’t put a measure in any of these five zones.

    In addition, there is no perfect 100% answer to replace the calculated column instead of measure. They are used in different scenarios, please review this article for more details.

    Best Regards,
    Angelia

    Tuesday, October 18, 2016 9:10 AM