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
I have a table like this
The data for actual will be from another table and keyed on the Product/Colour
What is the best method to calculate the actual ?
Thanks in advance
Solved! Go to Solution.
Hi @owenmdavies,
If the target table only has one match record, I think lookupvalue should be simple to get result.
If it has multiple records can match the conditions, you can try to sumx function.
Sample:
Calculate column Single= Lookupvalue(Target[Actual],Target[Product], Product[Product],Target[Color],Product[Color]) Total= SUMX(FILTER(ALL(Target),Target[Product]=EARLIER(Product[Product])&&Target[Color]=EARLIER(Product[Color])),[Actual])
Regards,
Xiaoxin Sheng
Hi @owenmdavies,
If the target table only has one match record, I think lookupvalue should be simple to get result.
If it has multiple records can match the conditions, you can try to sumx function.
Sample:
Calculate column Single= Lookupvalue(Target[Actual],Target[Product], Product[Product],Target[Color],Product[Color]) Total= SUMX(FILTER(ALL(Target),Target[Product]=EARLIER(Product[Product])&&Target[Color]=EARLIER(Product[Color])),[Actual])
Regards,
Xiaoxin Sheng
User | Count |
---|---|
60 | |
55 | |
53 | |
49 | |
30 |
User | Count |
---|---|
179 | |
87 | |
71 | |
48 | |
46 |