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 All,
I have the above tables and I would like to Calculate the sum of all back orders that can be filled where the IN SHIP stock can fill, per each x and y table.
I tried the Calculate(sum(x[back orders), IN SHIP[state]="x", USERELATIONSHIP(x[title],IN SHIP[title])).
I think I may have to use Filter instead of userelationship, but not sure how to.
Could you please help?
Thank you!
Solved! Go to Solution.
Hi @Krupture ,
Please try:
Measure =
var _a = CALCULATE(SUM('X State Back Orders'[Back Orders]),FILTER(ALL('X State Back Orders'),[State]=MAX('IN SHIP'[State])&&[Title]=MAX('IN SHIP'[Title])))
var _b = CALCULATE(SUM('Y State Back Orders'[Back Orders]),FILTER(ALL('Y State Back Orders'),[State]=MAX('IN SHIP'[State])&&[Title]=MAX('IN SHIP'[Title])))
return _a+_b
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Apologies about the delay. As I was offline due to personal circumstances. Will report back tomorrow
Hi @Krupture ,
Please try:
Measure =
var _a = CALCULATE(SUM('X State Back Orders'[Back Orders]),FILTER(ALL('X State Back Orders'),[State]=MAX('IN SHIP'[State])&&[Title]=MAX('IN SHIP'[Title])))
var _b = CALCULATE(SUM('Y State Back Orders'[Back Orders]),FILTER(ALL('Y State Back Orders'),[State]=MAX('IN SHIP'[State])&&[Title]=MAX('IN SHIP'[Title])))
return _a+_b
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
65 | |
61 | |
60 | |
53 | |
27 |
User | Count |
---|---|
181 | |
88 | |
70 | |
48 | |
46 |