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
Isidro
Helper IV
Helper IV

Show the accumulated balance with a filter

Hello,

 

I have the accumulated balance of an account. For example, season 16-17. When I use a filter and filter for season 16-17, the balance that appears is that of that period and what I would like is that the accumulated balance.

Is this possible to do? If possible, how can it be done?

Thank you very much and regards.

Slicer acumulado.jpg

 

 

 

 

 

1 ACCEPTED SOLUTION

@Isidro,

Please check if the following DAX returns your expected result.

Saldo running total in Mes = 
CALCULATE(
	SUM('Diario1'[Saldo]),
	FILTER(
		ALLSELECTED('Calendario'[Fecha]),
		Calendario[Fecha]<=MAX(Calendario[Fecha])
	)
)



Regards,

Community Support Team _ Lydia Zhang
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

16 REPLIES 16
vanessafvg
Super User
Super User

you would need a date or a sequence number like an index to accumulate the data.  Are the seasons linked to dates?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Hello,

 

Seasons are associated with dates. There is a table that shows the relationship between dates and seasons.

Tabla Calendario..jpgThank you very much for your help.

 

 

 

 

@Isidro,

You can follow the instructions in the blog below to create cumulative total. If you need exact DAX for your scenario, please help to share sample data of the two tables and post the relationship between the two tables.

http://www.daxpatterns.com/cumulative-total/

Regards,
Lydia

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

Hello Lydia,

 

The information that has passed me is very interesting and valuable.

 

In my case, it is not to get the accumulated, which I have already achieved, but when I use a slicer shows me the difference of the accumulated period that I frame with the previous period and what I want is to show the accumulated until the period marked.

 

Thank you very much and best regards.

@Isidro,

What formula do you use to create accumulated balance? Could you please post raw data of your tables or PBIX file so that I can test? 

Regards,

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

Hello,

 

@v-yuezhe-msft

 

The formula I have used is the one created by the quick measures which is the following:

 

Saldo acumulado =
CALCULATE(
 'ACCOUNT_INFORMATION'[ACTIVO];
 FILTER(
  CALCULATETABLE(
   SUMMARIZE(
    'CALENDAR';
    'CALENDAR'[NumTemporada];
    'CALENDAR'[Temporada]
   );
   ALLSELECTED('CALENDAR')
  );
  ISONORAFTER(
   'CALENDAR'[NumTemporada]; MAX('CALENDAR'[NumTemporada]); DESC;
   'CALENDAR'[Temporada]; MAX('CALENDAR'[Temporada]); DESC
  )
 )
)

 

Thank you very much

 

@Isidro,

Could you please share sample data of your original tables?

Reagrds,
Lydia Zhang

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

@v-yuezhe-msft

 

Hello Lydia,

 

I work with the following tables:

Calendar table
 

Calendario.jpg

 

 

 

Data table
 
 

 

Account_Information.jpg

 

Balance table

 

Balance_table.jpg

 

And here you can see the relationship between the different tables
Relations.jpgThank you very much ande best regards.

 

 

 

 

 

 
 
 

@Isidro,

I don't see the ACTIVO field in your data table, and I am not sure which fields you use to create relationship between the tables. Would you mind sharing me the PBIX file via Private message and post expected result in a table so that I can provide you appropriate DAX?

Regards,

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

@v-yuezhe-msft

 

Hello,

 

How can I send the file privately?

 

Thank you very much and best regards.

@Isidro,

Please refer to https://community.powerbi.com/t5/Welcome-to-the-Community/How-to-send-private-messages/td-p/232.

Also ensure that you send expected result to me.

Regards,

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

@v-yuezhe-msft

 

Hello Lydia,

 

I do not know how to insert the file into the message. How can you insert it?

 

Sorry for the inconvenience.

 

Thank you very much and best regards.

@Isidro,

You can upload PBIX file to OneDrive and post shared link of the file via Private message.

Regards,

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

Hi @v-yuezhe-msft

 

Did you see the file I shared privately with you?

 

Thank you very much and best regards.

@Isidro,

Please check if the following DAX returns your expected result.

Saldo running total in Mes = 
CALCULATE(
	SUM('Diario1'[Saldo]),
	FILTER(
		ALLSELECTED('Calendario'[Fecha]),
		Calendario[Fecha]<=MAX(Calendario[Fecha])
	)
)



Regards,

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

Hi @v-yuezhe-msft,

 

It is correct.

 

Thank you very much and best regards.

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.