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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
diogovaz
Frequent Visitor

Sum values

Hi guys,

 

I already searched but couldn't find an answer.

I have this 3 tables:

Captura de ecrã 2017-09-26, às 12.30.46.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I want to create a Measure Field on Client Table where sum all Sales NET Value where Invoice Date is greater or equal than Today - 18 Months and Segment ID is X, Y, W, Z.

 

Any ideas how to do it ?

 

Thanks,

1 ACCEPTED SOLUTION
diogovaz
Frequent Visitor

I already solve this. 

 

 

Last Purchase Order = CALCULATE(SUMX('Client';'Sales'[NET Value Measure]);
                       FILTER('Sales';'Sales'[Date_2]>=DATE(YEAR('Sales'[Current Date]);MONTH('Sales'[Current Date])-18;DAY('Sales'[Current Date])));
                       FILTER('Reference';'Reference'[Segment ID]="A"||'Reference'[Segment ID] = "B"||'Reference'[Segment ID] = "C"||'Reference'[Segment ID] = "F"))

Hope this is helpful to other :).

Thanks,

 

View solution in original post

1 REPLY 1
diogovaz
Frequent Visitor

I already solve this. 

 

 

Last Purchase Order = CALCULATE(SUMX('Client';'Sales'[NET Value Measure]);
                       FILTER('Sales';'Sales'[Date_2]>=DATE(YEAR('Sales'[Current Date]);MONTH('Sales'[Current Date])-18;DAY('Sales'[Current Date])));
                       FILTER('Reference';'Reference'[Segment ID]="A"||'Reference'[Segment ID] = "B"||'Reference'[Segment ID] = "C"||'Reference'[Segment ID] = "F"))

Hope this is helpful to other :).

Thanks,

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.