cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
indhu Member
Member

Need help with DAX

I am looking for a logic, This is the data I have

 

Fromplace        Toplace           Amountfrom       AmountTo

--------------------------------------------------------------------------

Chennai            delhi                   100                  50

Chennai            mumbai              200                  20

Delhi               Chennai               300                  50

 

I want to sum all the amount for one particular location and the output should look like this,

 

Place            Amount

----------------------------

Chennai           350

Delhi               350

Mumbai           20

 

Any help is much appreciated Smiley Happy 

 

Thanks,

Indhu.

1 ACCEPTED SOLUTION

Accepted Solutions
edhans New Contributor
New Contributor

Re: Need help with DAX

I did most of the legwork in Power Query for this. CHeck out this file. It involved several unpivot transformations, then removing the duplicates, then a simple SUM() function in DAX.

 

It is heavily dependent on the text in the columns not changing titles.

 

3 REPLIES 3
edhans New Contributor
New Contributor

Re: Need help with DAX

I did most of the legwork in Power Query for this. CHeck out this file. It involved several unpivot transformations, then removing the duplicates, then a simple SUM() function in DAX.

 

It is heavily dependent on the text in the columns not changing titles.

 

indhu Member
Member

Re: Need help with DAX

Thank you sooooo much Heart

Highlighted
edhans New Contributor
New Contributor

Re: Need help with DAX

You are very welcome.