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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
TK12345
Resolver I
Resolver I

CalculatedColumn Index

Hi,

Could someone help me with a calculated column index. 

I have the following data:

SortTestValueOutcome
1 11
2 12
3test02
4 13
5 14
6 15
7 16
8 17
9test07
10test07
11test07
12 18
13 19
14test09
15 110
16test010
17test010
18 111
19test011

 

Index needs to start with 1, if the column on the left is empty then I need +1 for the index column. I have tried the following:

Column = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Index]<=EARLIER('Table'[Index])))

But this was to heavy or something to calculate and it crashed. 

How do I need to do this with a calculated column? Needs to be calculated column because the other columns are calculated as well.

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @TK12345 ,

 

As far as I know, there should be a column as a condition for calculated index column, such as [Date],[Value]... and so on. I couldn't find a column which could be condition in your above table. Is [Sort] column a calculated index column in your table and your calculation is heavy or something to calculate and it crashed? I think calculation is based on data model, here I suggest you to try to optmize your data model or your code and try again.

For reference:

Optimization guide for Power BI - Power BI | Microsoft Learn

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-rzhou-msft
Community Support
Community Support

Hi @TK12345 ,

 

As far as I know, there should be a column as a condition for calculated index column, such as [Date],[Value]... and so on. I couldn't find a column which could be condition in your above table. Is [Sort] column a calculated index column in your table and your calculation is heavy or something to calculate and it crashed? I think calculation is based on data model, here I suggest you to try to optmize your data model or your code and try again.

For reference:

Optimization guide for Power BI - Power BI | Microsoft Learn

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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