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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
SergioMar15
New Member

undefined

Buenas tardes,

 

Estoy buscando una medida que me de el incremento entre fechas de un valor con una condición, 

 

Si tengo una tabla con tres columna, quiero hacer una medida que me haga el INCREMENTO

SergioMar15_0-1736867170471.png

 

Muchas gracias de antomena,

 

 

Un saludo.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@SergioMar15 ,

You can try the following measure.

 

Measure = 
VAR currentFlag = MAXA('Table'[TRUE/FALSE])
VAR currentValue = SUM('Table'[Valor])
VAR currentDate = MAX('Table'[Fecha])
VAR previousTrueDate = CALCULATE(MAX('Table'[Fecha]),FILTER(ALL('Table'),'Table'[Fecha]<currentDate && 'Table'[TRUE/FALSE]=TRUE() ))
VAR previousTrueValue = CALCULATE(SUM('Table'[Valor]),'Table'[Fecha]=previousTrueDate, ALL() )
RETURN
IF(previousTrueDate = BLANK(), 0 ,
    IF(currentFlag=1,currentValue-previousTrueValue, 0 )
)

 


The final result is as follows. Hopefully it will meet your needs.

vdengllimsft_0-1736912001122.png

Please see the attached pbix for reference.

Best Regards,
Dengliang Li

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

2 REPLIES 2
Anonymous
Not applicable

@SergioMar15 ,

You can try the following measure.

 

Measure = 
VAR currentFlag = MAXA('Table'[TRUE/FALSE])
VAR currentValue = SUM('Table'[Valor])
VAR currentDate = MAX('Table'[Fecha])
VAR previousTrueDate = CALCULATE(MAX('Table'[Fecha]),FILTER(ALL('Table'),'Table'[Fecha]<currentDate && 'Table'[TRUE/FALSE]=TRUE() ))
VAR previousTrueValue = CALCULATE(SUM('Table'[Valor]),'Table'[Fecha]=previousTrueDate, ALL() )
RETURN
IF(previousTrueDate = BLANK(), 0 ,
    IF(currentFlag=1,currentValue-previousTrueValue, 0 )
)

 


The final result is as follows. Hopefully it will meet your needs.

vdengllimsft_0-1736912001122.png

Please see the attached pbix for reference.

Best Regards,
Dengliang Li

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

AmiraBedh
Super User
Super User

What is the logic behind the column INCREMENTO ?


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.