Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a sales order table with the Order ID, Order Date, Year, Regio, State, Sales Amount, Quantity, Discount, and etc.
I have another table with the sales target for a given state, in a year and month.
How to find the states(Highlight) that have achieved their sales target?
Thank you. Any help would be appreciated.
Solved! Go to Solution.
Hi, @Anonymous
You can try the following methods.
Sample data:
Table1:
Table2:
Column:
Order Month = MONTH([Order Date])
Sales Sum = CALCULATE(SUM(Table1[Sales Amount]),
ALLEXCEPT(Table1,Table1[Year],Table1[Order Month],Table1[Postal Code]))
Target = LOOKUPVALUE(Table2[Target],
Table2[Year],[Year],
Table2[Month],[Order Month],
Table2[State],[Postal Code])
Result = IF([Sales Sum]>=[Target],1,0)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
You can try the following methods.
Sample data:
Table1:
Table2:
Column:
Order Month = MONTH([Order Date])
Sales Sum = CALCULATE(SUM(Table1[Sales Amount]),
ALLEXCEPT(Table1,Table1[Year],Table1[Order Month],Table1[Postal Code]))
Target = LOOKUPVALUE(Table2[Target],
Table2[Year],[Year],
Table2[Month],[Order Month],
Table2[State],[Postal Code])
Result = IF([Sales Sum]>=[Target],1,0)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
pls share the sample data, not the screenshot. and pls also provide the expected output based on the sample data you provided.
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |