cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Cummulated calculation NOT summing correctly

Hi, i have a bar/line graph.

On the X axis i have displayed the number of months which have passed from a date given. It comes from a DATEDIFF measure and then it´s converted into months, which is achieved simply by a chain of IFs which display "1month", "2months"...etc depending on the number of days passed. Then at each "months passed", a total sum of amount from a column it´s showed (that column shows debt of each customer)

 

So, finally i do a cummulated sum of that amount from that column and display it in form of a line. The problem is that is completely ilogical. The picture speaks for itself. The formula i used for the cummulated is: 

Acumulado Deuda =
VAR _fechaMax = MAX('1 Deuda Clientes sin carterizar'[F. Vencimiento])

RETURN
CALCULATE ([sumdeuda],
FILTER (
ALLSELECTED('1 Deuda Clientes sin carterizar'),
'1 Deuda Clientes sin carterizar'[F. Vencimiento] <= _fechaMax
))

 

Any suggestion?

Thanks in advance.

Cummulated.PNG

Captura.PNG

1 REPLY 1
MFelix
Super User
Super User

Hi @Anonymous ,

 

Is there any date related with the column of the +1 month and so on?

 

Believe that your issue is related with the fact that the calculation is not identifying the date correctly, to make sure you have the correct value of date try to place on the table visualization the  MAX('1 Deuda Clientes sin carterizar'[F. Vencimiento])  and check if the value is always the same or different, 

 

If you cannot find the reason, can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

If the information is sensitive please share it trough private message.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors