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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
blindsp0tkc2020
Frequent Visitor

Measure - Total Sales for Americas - calculate sales by Region by %

I am new to DAX and would like to get help on the following:

 

I would like to create a table with the following that will result in the following table:

 

Total Product sales for Product A is the sum of East, West and US-Other. While for Product B, total sales for United States is split by percentage between East and West and nil for "US-Other". How do I create the measure accordingly? Thank you for your help.

OrganizationProduct AProduct  BTotal
United States200300500
East125195 (65% of 300 United States)320
West50105 (35% of 300 United States)155
US-Other25025
3 REPLIES 3
V-pazhen-msft
Community Support
Community Support

@blindsp0tkc2020 

It is unlikely to give you the exact dax with just expected output, can you also provide a sample data of your model?

 

Regards
Paul

blindsp0tkc2020_1-1597683946487.png

 The OPEX for "Trading" is cut off here but essentially we want the 84.47 for January and other $ for the following months split between East (0.65) and West (0.35) but we can't get past this error. 

amitchandak
Super User
Super User

@blindsp0tkc2020 , You can create a table like this

summarize(crossjoin(location, product),[Location],[Product],"Sales" ,switch( True() , [product]="A" [Location] = "East" && sum([total sales])*.65))

 

Add all the conditions to Switch

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.