Forum Discussion
renanpinheiro
Advocate II
9 years agoCálculo de Régua
Hi guys, I need to create a calculated column in the table below: I have the "Cupons" and "Quantidade" columns. The "Items por Cupom" column is the division from the first to the second. ...
- 9 years ago
Hi renanpinheiro,
Based on my test, the formula below should work in this scenario. :smileyhappy:
Max of Items por Cupom = CALCULATE ( MAXX ( SUMMARIZE ( 'BD_LACUNA', 'BD_LACUNA'[Cluster], 'BD_LACUNA'[NOME_LOJA], "Cluster_NOME_LOJA_Items", [Items por Cupom] ), [Cluster_NOME_LOJA_Items] ), ALLEXCEPT ( 'BD_LACUNA', 'BD_LACUNA'[Cluster] ) )Regards
v-ljerr-msft
Microsoft Employee
9 years agoHi renanpinheiro,
Could you try the formula below to see if it works in your scenario? :smileyhappy:
Max of Items por Cupom =
CALCULATE (
MAX ( 'BD_LACUNA[Items por Cupom]' ),
ALLEXCEPT ( 'BD_LACUNA', 'BD_LACUNA'[Cluster] )
)
Regards
renanpinheiro
Advocate II
9 years agoHi v-ljerr-msft,
The "Items por Cupom" column is a measure and the MAX function does not allow you to use measures, how can I get around this?
- v-ljerr-msft9 years ago
Microsoft Employee
Hi renanpinheiro,
Based on my test, the formula below should work in this scenario. :smileyhappy:
Max of Items por Cupom = CALCULATE ( MAXX ( SUMMARIZE ( 'BD_LACUNA', 'BD_LACUNA'[Cluster], 'BD_LACUNA'[NOME_LOJA], "Cluster_NOME_LOJA_Items", [Items por Cupom] ), [Cluster_NOME_LOJA_Items] ), ALLEXCEPT ( 'BD_LACUNA', 'BD_LACUNA'[Cluster] ) )Regards