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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

how to do SUM 2 filelds in same column

image.png

 

How to sum NET_SALES of both bbcode JETIN IN and SJET IN baseed on YYYYMM.

YYYYMM[FYMAR-10][NET_SALES] + YYYYMM[FYMAR-10][NET_SALES] based on BBCODE.

 

OUTPUT shlouls be like this

 

image.png

 

and output should be in Row below the second total.

4 REPLIES 4
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

For your requirement, you could try the measure with dax expression below.

 

Measure = CALCULATE(SUM(Table1[Sales]),ALLEXCEPT(Table1,'Table1'[YYYYMM]))

Here is my test output.

 

output.PNG

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-piga-msft

 

I have attached my file. Am not getting the exact total.

 

Kindly help me on this.a.PNG

Hi @Anonymous,

 

Could you please share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PattemManohar
Community Champion
Community Champion

@Anonymous If you want to transform the data and to have final output in the YYYYMM and Net Sales only. Then, please use "Group By" option in "Power Query Editor" group on YYYYMM field and SUM the Net Sales. If you just want to show in visual only, then use the YYYYMM field to the table and Net Sales field (which will do the aggregation as sum).

 

Hope this helps !!





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

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