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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Calculate Sales by Channel by Region by County by Month

Hi Experts

 

I want to calculate the Sale for each period as a value of the total sales by Channel by Region by County by Month. I need a Calculated Column....

Sample Data

ChannelRegionMonthYearCountrySales
OOOEMEAJan2020Farnce2227
OOOEMEAFeb2020Farnce2054
OOOEMEAMar2020Farnce1830
OOOEMEAApr2020Farnce1292
OOOEMEAMay2020Farnce2325
OOOEMEAJun2020Farnce1918
OOOEMEAJul2020Farnce1905
OOOEMEAAug2020Farnce1507
OOOEMEASep2020Farnce2093
OOOEMEAOct2020Farnce2286
OOOEMEANov2020Farnce2310
OOOEMEADec2020Farnce1643
     23390
1 ACCEPTED SOLUTION

@Anonymous 

please kindly check

1.PNG





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

Proud to be a Super User!




View solution in original post

9 REPLIES 9
ryan_mayu
Super User
Super User

@Anonymous 

what's your expected output?





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

Proud to be a Super User!




Anonymous
Not applicable

Using the above sample data. then for Jan 2227/23390 = 0.095212... i want the calculated column measure to into account where we have mulitple regions and channels Per Month 

Hi, @Anonymous 

Please try the below-calculated column.

 

newcolunm = DIVIDE( 'Table'[Sales],
                                 CALCULATE( SUMX('Table', 'Table'[Sales]), ALL('Table'),
                                                      VALUES('Table'[Channel]),
                                                      VALUES('Table'[Region]),
                                                      VALUES( 'Table'[Year]),
                                                      VALUES('Table'[Country])))
 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


@Anonymous 

you can try to create a column like this

Column = 'Table'[Sales]/CALCULATE(sum('Table'[Sales]),ALLEXCEPT('Table','Table'[Channel],'Table'[Region],'Table'[Year],'Table'[Country]))

1.PNG





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

Proud to be a Super User!




Anonymous
Not applicable

Hi ryan....

Would the above accomdate for the following situation too

Capture.PNG

@Anonymous 

 

Column = CALCULATE(sum('Table'[Sales]),ALLEXCEPT('Table','Table'[Channel],'Table'[Region],'Table'[Year],'Table'[Country],'Table'[Month]))/CALCULATE(sum('Table'[Sales]),ALLEXCEPT('Table','Table'[Channel],'Table'[Region],'Table'[Year],'Table'[Country]))

 

you can try this





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

Proud to be a Super User!




Anonymous
Not applicable

Hi Ryan, Thanks. What results do you get in your table - my internet is down at the moment, using mobile to post.

@Anonymous 

please kindly check

1.PNG





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

Proud to be a Super User!




Anonymous
Not applicable

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.