Forum Discussion
DAX command to duplicate rows
- Anonymous4 years ago
Thank you Owen. I will try your solution out.
The test data that I have listed is just for simplicty ; The actual use case is that we have an initiatives around sales that drive revenue. Each row in the fact table represents a sale . Sometimes one of these rows can be driven by two or more initiatives ( count > 1 represents the nunber of initiatves that drove the sale). We need to attribute certain % of revenue to each initiative. Duplicating the rows would enable me to use %`s to attribute revenue.
P.S I gave Count as number for simplicty. actual data has count as text values segregated by delimiter for eg DigitalMarketing/SalesDriven/EmailCampaign. Duplicating the rows & little bit of dax will enable me to split one row and then each row will have one initiative & associated % . This will help me use it in reporting/filters etc.
Initially i thought aboout calcuated table , but was not sure about it because now I will have to connect all the dimesnion table to teh new calcuated table again. The original table has values beign pulled in from teh Dim tables using Related
Thank you Owen. I will try your solution out.
The test data that I have listed is just for simplicty ; The actual use case is that we have an initiatives around sales that drive revenue. Each row in the fact table represents a sale . Sometimes one of these rows can be driven by two or more initiatives ( count > 1 represents the nunber of initiatves that drove the sale). We need to attribute certain % of revenue to each initiative. Duplicating the rows would enable me to use %`s to attribute revenue.
P.S I gave Count as number for simplicty. actual data has count as text values segregated by delimiter for eg DigitalMarketing/SalesDriven/EmailCampaign. Duplicating the rows & little bit of dax will enable me to split one row and then each row will have one initiative & associated % . This will help me use it in reporting/filters etc.
Initially i thought aboout calcuated table , but was not sure about it because now I will have to connect all the dimesnion table to teh new calcuated table again. The original table has values beign pulled in from teh Dim tables using Related
Thank you. This formula does work .