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
eduardosilvin
Helper II
Helper II

Accumulated

Hi guys:

 

Could you help me with this? I have this DAX code:

 

Acumulado = VAR __Account = MAX('1Egresos'[NUMERO_CUENTA])
VAR __MinDate = MINX(FILTER('1Egresos', '1Egresos'[NUMERO_CUENTA] = __Account),[FECHA])
Return
CALCULATE(min('1Egresos'[saldo_ini]),filter( '1Egresos','1Egresos'[NUMERO_CUENTA] = __Account && [FECHA] = __MinDate ))
 
but I have this result:
 
TableTable
 

How could I visualize just in the first date the $466486.40 (for this example), and in the next rows put the sum of $466486.40 + the value of other coulm named "cargos"?

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@eduardosilvin 

 

I guess you might need to add ALl(Table) as the context to make the measure work, I added bold to the changes.

 

Acumulado = VAR __Account = MAX('1Egresos'[NUMERO_CUENTA])
VAR __MinDate = MINX(FILTER(all('1Egresos'), '1Egresos'[NUMERO_CUENTA] = __Account),[FECHA])
Return
CALCULATE(min('1Egresos'[saldo_ini]),filter( all('1Egresos'),'1Egresos'[NUMERO_CUENTA] = __Account && [FECHA] <= __MinDate ))

Paul Zheng _ Community Support Team
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

3 REPLIES 3
V-pazhen-msft
Community Support
Community Support

@eduardosilvin 

 

I guess you might need to add ALl(Table) as the context to make the measure work, I added bold to the changes.

 

Acumulado = VAR __Account = MAX('1Egresos'[NUMERO_CUENTA])
VAR __MinDate = MINX(FILTER(all('1Egresos'), '1Egresos'[NUMERO_CUENTA] = __Account),[FECHA])
Return
CALCULATE(min('1Egresos'[saldo_ini]),filter( all('1Egresos'),'1Egresos'[NUMERO_CUENTA] = __Account && [FECHA] <= __MinDate ))

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@V-pazhen-msft Than you, works great

 

Regards

amitchandak
Super User
Super User

@eduardosilvin , Try a measure like

Acumulado =
CALCULATE(min('1Egresos'[saldo_ini]),filter( '1Egresos','1Egresos'[NUMERO_CUENTA] = MAX('1Egresos'[NUMERO_CUENTA]) && [FECHA] <= max([FECHA] )))

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.