Forum Discussion
amilkarigi
8 years agoHelper I
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...
- 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 )
mattbrice
8 years agoSolution Sage
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 )
amilkarigi
8 years agoHelper I
Thanks a lot. It solved my problem just how i wanted it.