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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
sathishsam
Helper II
Helper II

I need help in summing up the values from a calculated Table. Please check the DAX

I need help in summing up the values from a calculated Table. Please check the DAX

 

Tbl_Trend =
VAR A = SELECTCOLUMNS(FILTER(TableA, TableA[Date] = MAX(TableA[Date])), "Country", MAXX(RELATEDTABLE(TableB),TAbleB[Country]), "Sales", TableA[Sales])

VAR B = SUMMARIZE(A, [Country], SUM(Sales))

 

I am getting an error on SUM(Sales)

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@sathishsam , If A nad B are Realated

 

Sumamrize(FILTER(TableA, TableA[Date] = MAX(TableA[Date])), TableB[Country], "Sales", Sum(TableA[Sales])  )

 

You can also explore Groupby

 

example here

https://amitchandak.medium.com/power-bi-power-query-vs-dax-append-and-summarize-data-233f173d0839

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@sathishsam , If A nad B are Realated

 

Sumamrize(FILTER(TableA, TableA[Date] = MAX(TableA[Date])), TableB[Country], "Sales", Sum(TableA[Sales])  )

 

You can also explore Groupby

 

example here

https://amitchandak.medium.com/power-bi-power-query-vs-dax-append-and-summarize-data-233f173d0839

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

WOW i didnt know this was this simple.. thank you so much @amitchandak 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors