This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi,
I have a table that looks somthing like below:
And want to insert a new row (yellow below) if a certain record is not repeated in the next period/date. In this example have the account number changed during the year and would need a null value for the period where the change happened in order to calculate a MTD value (source data in YTD values).
My table consist of more than 20m records and I would prefer to do this with SQL statement to run the command on the on-prem server instead of in Power Query.
Any help/guidance would be much appreciated!
Thanks
Alexander
I would prefer to only have that record created in 2022-08-01 in the above example. However, it would work in my use case if the record was repeated following months, although it would add unneccessary data.
@Anonymous Hi Alex, I was wondering, do you want 2022-09-01 and 2022-10-01 to also show that "3110 | X4P" are 0, or to show only for the 2022-08-01?
Unfortunately, the request to do this in SQL is beyond the scope of this Power BI Power Query forum. How you achieve this in SQL will depend on the how that environment is configured. You will need to speak to the DBA or Developers.
Many thanks
Daryl
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |