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.
Hi Members
I am new to powerbi and need a bit of help.
So I have 2 tables, table 1 has the budget which needs to be met between from date and to date by car park. Table 2, shows the sales made by date for the car park. Based on these 2 tables I need to create table 3 which shows the total sales against the budget by car park.
Table 1:
Car Park | Budget | FROM DATE | TO DATE |
Area A | 10,000.00 | 01/05/2020 | 31/10/2020 |
Area B | 200,000.00 | 01/01/2020 | 31/12/2020 |
Table 2:
Car Park | Date | Amount |
Area A | 01/05/2020 | 1,000 |
Area A | 10/05/2020 | 1,500 |
Area A | 10/06/2020 | 2,000 |
Area A | 15/06/2020 | 150 |
Area B | 10/06/2020 | 1,000 |
Area B | 10/07/2020 | 500,000 |
Area B | 11/07/2019 | 60,000 |
Area B | 05/08/2020 | 10,000 |
Area B | 01/02/2020 | 50,000 |
Table 3:
Car Park | Budget | FROM DATE | TO DATE | Total | |
Area A | 10,000.00 | 01/05/2020 | 31/10/2020 | 4,650 | |
Area B | 200,000.00 | 01/01/2020 | 31/12/2020 | 561,000 |
Hi @ninakarsa
try to add a measure in your table 1:
Total = CALCULATE(
SUM(Table2[Amount]),
DATESBETWEEN(Table2[Date],SELECTEDVALUE(Table1[FROM DATE]),SELECTEDVALUE(Table1[TO DATE]))
)
before, be sure you have a relationships between Table1 and Table2 by [Car Park] columns
do not hesitate to give a kudo to useful posts and mark solutions as solution
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 |
---|---|
49 | |
26 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
43 | |
19 | |
18 |