Forum Discussion
ktt777
6 years agoHelper V
filter with relationship
Hi
I have a table as below :
| Period | Country | Sale | Type | Status |
| 1/1/2020 | Vietnam | 1 | Internal | Active |
| 1/1/2020 | Lao | 3 | Internal | Active |
| 1/1/2020 | Germany | 4 | External | Active |
| 1/1/2020 | France | 5 | External | Active |
| 1/2/2020 | Vietnam | 4 | Internal | Active |
| 1/2/2020 | Lao | 3 | External | Active |
| 1/3/2020 | Germany | 2 | Internal | Active |
| 1/3/2020 | France | 1 | External | Active |
it has relationship with below table :
| Region | Country |
| Asia | Vietnam |
| Asia | Lao |
| Europe | Germany |
| Europe | France |
How to i write dax fomular to calculate sale for different region ?
thanks ,
ktt777 ,
If your expected output is like above post so follow the below steps and also I attached screen shot for your reference:
Step 1: Create relationship between both the table based on Country.
Step 2: Create DAX Measure like below in SALES table:
Region_Sales = CALCULATE(SUM('SALES'[Sale]),ALLEXCEPT(REGIONS,REGIONS[Region]))
3 Replies
- Tahreem24Super User
- Tahreem24Super User
ktt777 ,
If your expected output is like above post so follow the below steps and also I attached screen shot for your reference:
Step 1: Create relationship between both the table based on Country.
Step 2: Create DAX Measure like below in SALES table:
Region_Sales = CALCULATE(SUM('SALES'[Sale]),ALLEXCEPT(REGIONS,REGIONS[Region]))
- amitchandakSuper User
ktt777 , Join Country with country in both tables and then put region with sum sales in any visual ?