Forum Discussion
onernoa
4 years agoNew Member
% of Total Measure
Hello All
I would like to know the % of gr_qty to total for each article in each fiscal week ending dte.
In fiscal week ending date 09/07/2022
Site 1 recevied 5 of article 'a'
All Sites received 14 (5 + 7 + 2) of article 'a'
I would like a column that calculates (5 /14) for row 1, (7/14) for row 2, (2/14) for row 3, (6/19) for row 4 and so on.
| site | fiscal_week_ending_dte | article | gr_qty |
1 | 09/07/2022 | a | 5 |
| 2 | 09/07/2022 | a | 7 |
| 3 | 09/07/2022 | a | 2 |
| 1 | 09/07/2022 | b | 6 |
| 2 | 09/07/2022 | b | 5 |
| 3 | 09/07/2022 | b | 8 |
| 1 | 02/07/2022 | a | 4 |
| 2 | 02/07/2022 | a | 4 |
| 3 | 02/07/2022 | a | 7 |
| 1 | 02/07/2022 | b | 7 |
| 2 | 02/07/2022 | b | 5 |
| 3 | 02/07/2022 | b | 7 |
Thanks in advance!
- Anonymous4 years ago
Hi
Try something like this DAX measure:
DIVIDE( CALCULATE( sum(your_table[gr_qty]) ), CALCULATE( sum(your_table[gr_qty]), ALL(your_table[site]) ) )Kind regards,
José
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂
2 Replies
- AnonymousNot applicable
Hi
Try something like this DAX measure:
DIVIDE( CALCULATE( sum(your_table[gr_qty]) ), CALCULATE( sum(your_table[gr_qty]), ALL(your_table[site]) ) )Kind regards,
José
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂- onernoaNew Member
Thank you! I was over complicating it so much. Have a great day, José.