Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago
Solved

USE PARAMETER VALUE FOR A COLUMN VARIABLE

Good evening, I have the following variable to create a new column in which according to the ranking number determined by the value of the Total field per family it is determined, according to the va...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Xavier2609 ,

    What you are creating is a calculated column, and that what-if parameter was used in this new created calculated column? If yes, as the value of a calculated column is computed during data refresh and uses the current row as a context, it will not change according to the user interaction(slicer, filter, column selections etc.) in the report. So it will not return your expected result, when switch the value of what-if parameter in the calculated column... If you want to get the TOPN and others items dynamically, you can refer the following links to get it by creating measure +what-if parameter or TOPN filter function.

    Filter top 3 products with a row for others using DAX in Power BI

    DAX Fridays! #132: Dynamic TopN + Others in Power BI

     

    In addition, you can review the following links about the difference of calculated column and measure...

    Calculated Columns and Measures in DAX

    Calculated Columns vs Measures

    There is a big difference between calculated columns and measures. The value of a calculated column is computed during data refresh and uses the current row as a context; it does not depend on user interaction in the report. A measure operates on aggregations of data defined by the current context, which depends on the filter applied in the report – such as slicer, rows, and columns selection in a pivot table, or axes and filters applied to a chart.

    Best Regards