Forum Discussion

amilkarigi's avatar
amilkarigi
Helper I
8 years ago
Solved

Measure Misunderstanding

Hi, I'm trying to create a measure that calculates my top 10 buyers/customers who have bought an specific product (my top product from an specific year) which is calculated with another measure calle...
  • mattbrice's avatar
    8 years ago

    I believe the error is because Dax engine has detected that your TOPN function in "Mas Vendido" could return more than one value (in a tie situation)  So I think you eithe either need to test if "Prod" variable has more than one row and respond accordingly, or perhaps wrap it in a FIRSTNONBLANK call like so:

     

    Mas Vendido = FIRSTNONBLANK ( TOPN(1; ALL(Productos[ProductName]); [Ventas Total];DESC), 1 )