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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

create acumulate column using previous value row

Guys,
I want to create a column that use the acumulate percentual such as picture below:

leandroctavares_0-1670359328199.png

In real, I tried to use productx using % Vlr Desistência, but I don't get the previus value of % Vlr Desistência linking with "Parcela" to create a measure in the correct form. Someane help me??

 

leandroctavares_1-1670359423896.png

 

2 REPLIES 2
v-xiaosun-msft
Community Support
Community Support

Hi @Anonymous ,

 

Since I don't know what the measure [% Vlr Desistência] in your formula is, I made a sample using the sample data you gave above, and here is my solution. You can create a calculated column as below.

Sample data:

vxiaosunmsft_0-1670382813260.png

Create a column.(EARLIER function is mostly used in the context of calculated columns.)

 

Column =
VAR _a =
    CALCULATE (
        1 - MAX ( 'Table'[%] ),
        FILTER ( 'Table', 'Table'[Column1] < EARLIER ( 'Table'[Column1] ) )
    )
VAR _b =
    CALCULATE (
        1 - MAX ( 'Table'[%] ),
        FILTER ( 'Table', 'Table'[Column1] < EARLIER ( 'Table'[Column1] ) - 1 )
    )
RETURN
    _a * _b

 

Final output:

vxiaosunmsft_1-1670382879512.png

 

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ xiaosun

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

Anonymous
Not applicable

How can I create your table from my table that it has more than one value "Parcela" for example??

this problem has two solution, like your answer but I don't know how create your table from my table. Or create a measure referencing the same table that will be placed this measure that I don't know too.

leandroctavares_0-1670505741013.png

Below I show that value in measure  % Vlr_Desistência and 

 

% Vlr_Desistência = (CALCULATE(SUM(Base_PowerBI[VALOR]),Base_PowerBI[STATUS] = "C"))/SUM(Base_PowerBI[VALOR])
% Qntd Desistência = (CALCULATE(SUM(Base_PowerBI[QTD]),Base_PowerBI[STATUS] = "C"))/SUM(Base_PowerBI[QTD])

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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