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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Clarisse
Regular Visitor

Add a column with an iterative formula

Hello 🙂

 

I would like to add a column to my table with "modification x" with x going from 1 to x+1 while the first column is not blank..

Is it possible in Power BI?

 

Thanks

5 REPLIES 5
v-ljerr-msft
Employee
Employee

Hi @Clarisse,

 

Could you post your table structures with some sample data and the expected result against it, so that we can better assist on this issue? Smiley Happy

 

Regards

Hi @v-ljerr-msftand @Greg_Deckler,

 

For example I got : PBI_AddColumn.PNG

I would like to have a third column with, for each line, Modification1, Modification2, Modification3, Modification4...Exel_AddColumn.PNG

Those datas come from a SharePoint List and and they are going to change and to grow, I want to be sure that if there is a new line added there will be ModificationN+1 on the third column.

I can't modified the SharePoint List and I don't want to use an excel sheets with the datas because I want to refresh it directly from Power BI.

 

Thanks 🙂 

Hi @Clarisse,

 

If I understand you correctly, you should be able to follow steps below to add this column in your table. Smiley Happy

 

1. Add an Index column in Query Editor under Add Column > Index Column > From 1.

 

index1.PNG

 

2. Then use the formula below to add a new calculate column in your table.

Column = "Modification" & Table1[Index]

Note: just replace "Table1" with your real table name.

 

c2.PNG

 

Regards

You understood correctly,

It doesn't work, it says that the access is denied.  I guess the SharePoint is too proctected and I am not the admin of it...

Greg_Deckler
Super User
Super User

Not following this, can you post some example data and then what you want in your new column?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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