Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
Organization | Product A | Product B | Total |
United States | 200 | 300 | 500 |
East | 125 | 195 (65% of 300 United States) | 320 |
West | 50 | 105 (35% of 300 United States) | 155 |
US-Other | 25 | 0 | 25 |
@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
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.
@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