Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
AleMotta84
Frequent Visitor

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

 

AleMotta84_0-1714125559205.png

 

 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.

 

AleMotta84_1-1714125756263.png

 

AleMotta84_2-1714125897512.png

 

 

AleMotta84_3-1714126160039.pngAleMotta84_4-1714126203413.png

 

 What can be the problem?

 

Thank you!!!!

 

Alessandro

 

 

 

1 ACCEPTED SOLUTION
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.

View solution in original post

1 REPLY 1
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.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.