The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi there,
I try to use sumx with summarize to group the article_code. However its not work as well. Which is work in my other bi report.
I would like to sum Sales by ArticleCode within the Period StartDate2 to +6. Thank you very much....
Thank you very much....
Solved! Go to Solution.
Hi @sammy02hk
Maybe you can try the following code
LW Sales 1 =
Var StartDate = LOOKUPVALUE(DATA_LIST_CUR_DateMatch[LW],DATA_LIST_CUR_DateMatch[Date],
SELECTEDVALUE(DATA_LIST_CUR_DateMatch[WkMonday]))
Var StartDate2 = DATE(LEFT(StartDate,4),MID(StartDate,6,2),RIGHT(StartDate,2))
return
SUMX(filter(all('Full 100013'),'Full 100013'[Article_Code]=Max('Full 100013'[Article_Code])&&'Full 100013'[Billing_Date]>= StartDate2 &&
'Full 100013'[Billing_Date]<= StartDate2 +6 ),[Sales])
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Yolo,
Thank you for your help ...
Sammy
I have try different way to write the syntax but it is not working at all. The no is correct, just cant group by with summarize.
Thank you for your help....
Hi @sammy02hk
Maybe you can try the following code
LW Sales 1 =
Var StartDate = LOOKUPVALUE(DATA_LIST_CUR_DateMatch[LW],DATA_LIST_CUR_DateMatch[Date],
SELECTEDVALUE(DATA_LIST_CUR_DateMatch[WkMonday]))
Var StartDate2 = DATE(LEFT(StartDate,4),MID(StartDate,6,2),RIGHT(StartDate,2))
return
SUMX(filter(all('Full 100013'),'Full 100013'[Article_Code]=Max('Full 100013'[Article_Code])&&'Full 100013'[Billing_Date]>= StartDate2 &&
'Full 100013'[Billing_Date]<= StartDate2 +6 ),[Sales])
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
21 | |
12 | |
10 | |
7 |