Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Thomvdw
Frequent Visitor

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 1
mah_priya94
Helper I
Helper I

Hi @Thomvdw ,

Could you please provide some sample data for the same.?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.