Forum Discussion
Distribute data over defined categories
- 7 years ago
Hi tokyobaer
Sorry I missed that bit about RESS02/RESS03. We can do it using two queries from table 1. The first we filter to only RESS01 and apply table 2. The second we filter out RESS01 then apply the GRP logic. Finally we combined those table together.
I updated my .pbix file https://www.dropbox.com/s/nipbf7dgs45t78r/ProjectHours.pbix?dl=0
You have some lines in your output that I am not sure how you arrived at. Amounts for Grp4 and Grp5 but they are not in table 2. That being said, I think we can get what you are looking for by doing the unpivot on table 2 then removing the zeros before doing the merge and calc.
I have posted my sample file here: https://www.dropbox.com/s/nipbf7dgs45t78r/ProjectHours.pbix?dl=0
Hey jdbuchanan71 ,
thank you very much for your quick reply! As mentioned in my original post, RESS02 is always in Grp4 and RESS03 is always in Grp5. So if you want, there is another Table 2B:
| Ressource | Group |
| RESS01 | Shared (see Table 2) |
| RESS02 | Grp4 |
| RESS03 | Grp5 |
That is why a direct unpivot / merge did not work out - it should only be performed on the RESS01, while for RESS02/RESS03 there is the other rule (Table 2A). Somehow a "partial unpivot" transformation.