Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

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.

1 Reply

  • 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.