Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
HI,
I have on table tha have all sales with products. So i will have the same sales code in many lines, if the sale have 3 products i will have 3 lines, one for each product but all with the sales code.
Each of this products have one group. I need to calculate the % of the product from this group inside the sale. I tried to use
% Herbicida = IF('Vendas com Produtos'[Group]="Herbicida";'Vendas com Produtos'[Total_Product]/'Vendas com Produtos'[TOTAL_SALES])
But with this I will have the information only in the line that have the product with that group, I need this information to be in all the sales lines.
Solved! Go to Solution.
You may try the following DAX.
Column = DIVIDE ( SUMX ( FILTER ( 'Vendas com Produtos', 'Vendas com Produtos'[sales code] = EARLIER ( 'Vendas com Produtos'[sales code] ) && 'Vendas com Produtos'[Group] = "Herbicida" ), 'Vendas com Produtos'[Total_Product] ), 'Vendas com Produtos'[TOTAL_SALES] )
You may try the following DAX.
Column = DIVIDE ( SUMX ( FILTER ( 'Vendas com Produtos', 'Vendas com Produtos'[sales code] = EARLIER ( 'Vendas com Produtos'[sales code] ) && 'Vendas com Produtos'[Group] = "Herbicida" ), 'Vendas com Produtos'[Total_Product] ), 'Vendas com Produtos'[TOTAL_SALES] )
User | Count |
---|---|
98 | |
91 | |
84 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |