Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I'm stuck with something very silly but I'cant find the solution.
I have the sales for the month and a target for each month.
Something like this:
Table 1
MONTH | Target |
Ene | 1200 |
Feb | 1345 |
Mar | 789 |
Abr | 1500 |
May | 1600 |
Table 2
Sales | Target | |
January SHOP 1 | 128 | 1200 |
January SHOP 2 | 235 | 1200 |
January SHOP 3 | 524 | 1200 |
January SHOP 4 | 576 | 1200 |
What I need is to calculated the total sales of all the shops vs the target of the moth that is 1200. Solution expected 1463-1200=263. Which will be the optimum method to do this?
Thanks!!
Solved! Go to Solution.
Your tables have to be linked someway, for example, by month (Table1 to Table 2, 1 to many)
Then a new measure:
Sales diff = CALCULATE(SUM('Table 2'[Sales]))-CALCULATE(SUM('Table 1'[Target]))
Then you'll get desired amount for all months or for selected month only.
For example, if you make a bar chart visual with month number as x-axis, and put this measure in the values, you'll get what you want
Are the months have different names in your tables? "Ene" and "January"?
Always the same, in fact i'm using the number of the month
Your tables have to be linked someway, for example, by month (Table1 to Table 2, 1 to many)
Then a new measure:
Sales diff = CALCULATE(SUM('Table 2'[Sales]))-CALCULATE(SUM('Table 1'[Target]))
Then you'll get desired amount for all months or for selected month only.
For example, if you make a bar chart visual with month number as x-axis, and put this measure in the values, you'll get what you want
Works perfectly! Thank you so much!!
User | Count |
---|---|
97 | |
76 | |
76 | |
48 | |
26 |