Forum Discussion
rishirajdeb
2 years agoAdvocate I
Implementing allocation logic in Power BI
Hi All, I have to create a solution in Power BI (it's even fine to combine other Power Platform components, i.e., Power Apps & Power Automate if required). The source data contains sales amounts ...
rishirajdeb
2 years agoAdvocate I
Attaching the data for convenience.
Source table:
| country | category | quantity | POS | transaction date | transaction id |
| USA | 1 | 23 | 02-05-2023 | 5064 | |
| USA | 1 | 56 | 02-05-2023 | 5406 | |
| USA | 1 | 78 | 03-05-2023 | 1878 | |
| USA | 1 | 43 | 03-05-2023 | 6842 | |
| USA | 1 | 200 | 09-05-2023 | 3181 | |
| USA | 1 | 100 | 09-05-2023 | 6259 | |
| USA | 2 | 200 | 123 | 09-05-2023 | 9568 |
| USA | 2 | 300 | 456 | 09-05-2023 | 4930 |
Required output:
| country | category | quantity | POS1 | POS2 | Certificate |
| USA | 1 | 23 | 23 | 123 | |
| USA | 1 | 56 | 56 | 123 | |
| USA | 1 | 78 | 78 | 123 | |
| USA | 1 | 43 | 43 | 123 | |
| USA | 1 | 200 | 200 | 456 | |
| USA | 1 | 100 | 100 | 456 |
If required, an Index column can also be added to the source data.
Thanks.