Forum Discussion
Generate rows conditionally
Hi Community,
I'am working in a calculated table with the following fields:
- ContractID (numerical value)
- Accounting period (always the first of the month, e.g. 1-1-2021, 1-2-2021 and so on).
- Contract end date (can be any date value)
- Recurring charge
Example is:
ContractID - AccountingPeriod - ContractEndDate - MonthlyRecurringCharge
3001 - 1-1-2021 - 31-12-2021 - 30
The data consists of around 70000 rows per month.
The goal is that it generates rows for every accounting period within the contract end date a row with the recurring charge, for example:
ContractID - AccountingPeriod - ContractEndDate - MonthlyRecurringCharge
3001 - 1-1-2021 - 31-12-2021 - 30
3001 - 1-2-2021 - 31-12-2021 - 30
3001 - 1-3-2021 - 31-12-2021 - 30
3001 - 1-4-2021 - 31-12-2021 - 30
3001 - 1-5-2021 - 31-12-2021 - 30
....
3001 - 1-12-2021 - 31-12-2021 - 30
I have come upon some coding in M, but I cant figure out how that works within a calculated table (seems not working as query editor is not available?).
Hope there is a solution for this within DAX.
Many thanks in advance,
Thom
1 Reply
- AnonymousNot applicable
Hi Anonymous ,
Could you please provide some sample data for the same.?