vendredi 27 novembre 2020

Using the IF function in Excel Powerpivot with DAX

I am trying to use an if statement in excel measures for powerpivot tables. I am trying to calculate revenue per unit but I have one Product Line that calculates revenue differently than all the other Product Lines. The equation I am trying to use is =IF(tableA column = "certain Product Line", calculated revenue for PL/calculated units for PL, calculated revenue for all other PLs / Calculated units for all other PLs). For some reason I keep getting the error "Calculation error in measure, a single value for column 'PRODUCT_LINE' in table 'A' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result".

Aucun commentaire:

Enregistrer un commentaire