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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Dirk_Kuypers
Frequent Visitor

create new table with loop calculation

Hello,

 

Need som help on creating a new table with columns from an other table. In this existing table there is date and a frequency in days.

The date is the last time an item number was executed. 

 

What I need is a new (calculated) table where for each index nr the folowing data is calculated:  

  - Add number of days (Frequency in days) to the last time item was used (Last date item used).

  - Keep adding new dates as many times as listed in ( #times/year)

  - Keep index numbers as in existing table so I link up the 2 tables

This is what I need:

 

Dirk_Kuypers_0-1615972293295.png

 

3 REPLIES 3
amitchandak
Super User
Super User

@Dirk_Kuypers , logic is not clear . but generate and generateseries

 

refer:

https://curbal.com/blog/glossary/generate-dax

https://docs.microsoft.com/en-us/dax/generate-function-dax

https://www.sqlbi.com/articles/using-generate-and-row-instead-of-addcolumns-in-dax/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi,

 

I wil try to explain what my problem is.

I have an excel file wich is generated from our SAP system. I generates all the maintenance tasks that are in the system. In this file I have the task number, the date when the task was created, a frequence (in days) when the task needs to be executed.

From this is was able to calculate when the task generated and executed for the last time.

What we don't have is a list when all the tasks are being scheduled again after "Today" and this for the next 365 days (1 year)

There are tasks wich have to done once a week and others once in 24 weeks, 56 weeks,.... and so on.

What I need now is table thats generates all these dates in the future so I can show these in different graphs so we can see when there is a huge workload en where not.

 

For each index number a row with a date for the next order. The column (#times/year) is the number of times the frequency (in days) has to be aded to the previous date.

Then I have a list for all the orders with the dates in the next 365 days.

 

Hope this is a little bit clear now?

Or maybe there is an other way to do this?

Hi, @Dirk_Kuypers 

 

Can you explain the logic about how to calculate the next date planned?

And can you share some sample fake data with table form instead of screenshoot? So we can quickly help you deal with the problem.Thanks.

 

Best Regards

Janey Guo

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors