Forum Discussion
ClausS
1 year agoHelper I
Creating a new table to normalize records from a second table
Hi, I need help with the following Problem: Table A has records about service contracts and their value as well as covered time frame. I have contracts for 1 to 5 years. For better analytics, I...
- 1 year ago
Hi ClausS - you can try below suggested solutions and request from Sahir_Maharaj and uzuntasgokberk .
giving another alternative with a new calculated table logic as below
CalculatedTable =VAR ExpandedTable =GENERATE(TableA,ADDCOLUMNS(GENERATESERIES(0,INT(DATEDIFF(TableA[StartDate], TableA[EndDate], MONTH) / 12),1),"GeneratedStartDate",EDATE(TableA[StartDate], [Value] * 12),"GeneratedEndDate",EDATE(TableA[StartDate], ([Value] + 1) * 12) - 1,"ProratedValue",TableA[Value] / TableA[Years]))RETURNSELECTCOLUMNS(ExpandedTable,"RecID", TableA[RecID],"Name", TableA[Name],"StartDate", [GeneratedStartDate],"EndDate", [GeneratedEndDate],"Value", [ProratedValue],"Years", 1)Hope this works please check.
uzuntasgokberk
1 year agoSuper User
Hello ClausS ,
Filter years column to 1?
Kind Regards,
Gรถkberk Uzuntaล
๐ If this post helps, then please consider Accepting it as a solution and giving Kudos โ it helps other members find answers faster!
๐ Stay Connected:
๐ Medium |
๐บ YouTube |
๐ผ LinkedIn |
๐ท Instagram |
๐ฆ X |
๐ฝ Reddit |
๐ Website |
๐ต TikTok |