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
Jammer8888
Frequent Visitor

Creating a cumulative column breaking on another column - help !

 

Hi,

 

I am new to Power BI and I am looking for a very simple way to bring back the 'Cume' column (shown in the example below) into my dataset so I can filter on the Cume = '1' to get a unique value. I know that I will have to sort the data on 'Colour' in order to get the column in the right order first but after that I am at a loss. I don't want to group the data or anything else - just simply create the cumulative value based on the count breaking on the Colour Column. 

 

ColourCountCume
Red11
Red12
Red13
Blue11
Green11
Yellow11
Yellow12
Yellow13
Orange11


I am sure there is a very simple way to do this for a beginner but I have not been able to figure it out yet - any help would be greatly appreciated. Many thanks.

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@Jammer8888

 

Hi, a way to solve this:

 

in Edit Query:

 

Add a Index Column --Close & Apply

 

After this:

 

Create a new column 

 

Cume=RANKX(FILTER(Table1,Table1[Colour]=EARLIER(Table1[Colour])),Table1[Index],,ASC)

 

Regards

 

Victor

Lima - Peru

 




Lima - Peru

View solution in original post

2 REPLIES 2
Vvelarde
Community Champion
Community Champion

@Jammer8888

 

Hi, a way to solve this:

 

in Edit Query:

 

Add a Index Column --Close & Apply

 

After this:

 

Create a new column 

 

Cume=RANKX(FILTER(Table1,Table1[Colour]=EARLIER(Table1[Colour])),Table1[Index],,ASC)

 

Regards

 

Victor

Lima - Peru

 




Lima - Peru

That is great Victor - a simple and elegant solution. Thank you very much for your help on this.

 

Chris.

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.