Forum Discussion

AleMotta84's avatar
AleMotta84
Frequent Visitor
2 years ago
Solved

Calculate total after a date issues

Hi all,

I've got 2 tables, one for my banks movements (Movimenti) and one with my future movements (Previsionale).

I'm trying to calculate future movements by filtering the table Previsionale by date.

 

I did it with this measure:

Importo Rev Prev2 = 
VAR DataUltimoMovimento = MAX(Movimenti[Data])
RETURN
CALCULATE(SUM(Previsionale[Importo]),
    FILTER(Previsionale, Previsionale[Data]>DataUltimoMovimento
))*-1

It works but not at all.

MAX(Movimenti[Data]) = 24/04/2024

 

In the table on the right there are all the future movements without filters and in the graph on the left movements with the measure.

 

The total ammount for the "Vacanza" category is correct because the measure excludes the first one. 720 future vs 960 for all

 

 

 The totals for categories "Test" and "Spesa" are incorrect because the measure calculate values with Date < 24/04/2024

"Test" should be 0 and "Spesa" 5400 in the graph.

 

 

 

 

 

 What can be the problem?

 

Thank you!!!!

 

Alessandro

 

 

 

  • Update: I found the issue, there aren't some categories like "Test" in movement table.

    When I added a line with that category "Test" disappeard from the graph.

1 Reply

  • AleMotta84's avatar
    AleMotta84
    Frequent Visitor

    Update: I found the issue, there aren't some categories like "Test" in movement table.

    When I added a line with that category "Test" disappeard from the graph.