Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Frequent Visitor

Help with creating a loop

Hi all,


I need help in creating a loop.


I have this kind of a table:





I need to check what is the date (starting from today) when either the sum of the persons Daily_sum values from the previous 30 days is less than 3000 or the “Date 1” date is in the past? The result should be the date as a String and if neither happens in the next 14 days, then the result should be a String “next 14 days OK”.


I’m guessing a loop running 14 times is the only way to do this but I’ve never used one.

Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors