Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi there,
Thank you for your help. I got 2 table and I would like to sum the Net Sales. I have tried different mearsures, but they either wrong total or missing total.
Table Structure as below:
Table 1 Promotion Period
ArticleCode SiteCode End_Date (Measure Caluate sales after EndDate)
Table 2 Txn Details
ArticleCode SiteCode Billing_Date NET_SALES
M2:
Solved! Go to Solution.
Hi @sammy02hk
please try
M1 =
SUMX (
SUMMARIZE (
'Table1',
'Table1'[Article_Code],
'Table1'[SiteCode],
'Table1'[End Date_New]
),
VAR a = 'Table 1'[End Date_New]
VAR n = 'Table 1'[SiteCode]
RETURN
CALCULATE (
SUM ( 'Table 2'[NET_SALES] ),
'Table 2'[BILLING_DATE] > a
&& 'Table 2'[SITE_CODE] = n
)
)
AfterPeriodSalesM =
SUMX (
SUMMARIZE (
'Table1',
'Table1'[Article_Code],
'Table1'[SiteCode],
'Table1'[End Date_New]
),
VAR a = 'Table 1'[End Date_New]
VAR n = 'Table 1'[SiteCode]
RETURN
CALCULATE (
SUMX ( 'Table 2', VALUE ( 'Table 2'[NET_SALES] ) ),
FILTER ( 'Table 2', 'Table 2'[BILLING_DATE] > a && 'Table B'[SITE_CODE] = n )
)
)
Hi @sammy02hk
please try
M1 =
SUMX (
SUMMARIZE (
'Table1',
'Table1'[Article_Code],
'Table1'[SiteCode],
'Table1'[End Date_New]
),
VAR a = 'Table 1'[End Date_New]
VAR n = 'Table 1'[SiteCode]
RETURN
CALCULATE (
SUM ( 'Table 2'[NET_SALES] ),
'Table 2'[BILLING_DATE] > a
&& 'Table 2'[SITE_CODE] = n
)
)
AfterPeriodSalesM =
SUMX (
SUMMARIZE (
'Table1',
'Table1'[Article_Code],
'Table1'[SiteCode],
'Table1'[End Date_New]
),
VAR a = 'Table 1'[End Date_New]
VAR n = 'Table 1'[SiteCode]
RETURN
CALCULATE (
SUMX ( 'Table 2', VALUE ( 'Table 2'[NET_SALES] ) ),
FILTER ( 'Table 2', 'Table 2'[BILLING_DATE] > a && 'Table B'[SITE_CODE] = n )
)
)
Hi It works.
I have try different way to use summarize as well. But it didn't work out.
Lets me study how to embed this...
Thank you very much
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 9 | |
| 9 | |
| 8 |