March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Register NowGet certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
I have two tables.
Table 1:
Date | Amount |
1/1/2024 | 50 |
2/1/2024 | 60 |
3/1/2024 | 70 |
4/1/2024 | 80 |
5/1/2024 | 90 |
Table 2:
Date | Offset |
2/1/2024 | 10 |
3/1/2024 | 20 |
4/1/2024 | 30 |
I'd like to get a table like this:
Date | Amount + Offset |
1/1/2024 | 50 |
2/1/2024 | 70 |
3/1/2024 | 90 |
4/1/2024 | 110 |
5/1/2024 | 90 |
I think this should be easy, but I've spent several hours without figuring it out. Any help would be appreciated.
Thanks!
Solved! Go to Solution.
There are various approaches. Regardless of which approach, you should get a calendar table.
https://exceleratorbi.com.au/power-bi-calendar-tables/
then you can either join the calendar table to bith of the tables to have (one to many), use the calendar table in your visual and then write a measure = sum(table1[amount]) + sum(table2[offset])
or, if it were me, and if the tables actually look like those you posted (ie, there's nothing your holding back and not telling me), I would do the following
in power query, create transform table 1 to be like
date, attribute, amount
1/1/24, "Amount", 450
etc
table 2, exactly the same headers but put "offset" as the attribute
append the 2 tables together and load a single table
still join to the calendar table as above.
you can simply drag the amount column into the values section and even use the attribute column in your visual.
Hello @kman42
You can acheive this doing by following steps:
1. Create a Date Table by going to modelling and in the new table add the following dax:
3. Create a measure:
Let me know if you got this. Kudos!
hi @kman42 ,
To start less stressfully, you can add a calculated column in table1 like this:
Column =
[Amount] +
LOOKUPVALUE(
table2[offset],
table2[date],
table1[date]
)
hi @kman42 ,
To start less stressfully, you can add a calculated column in table1 like this:
Column =
[Amount] +
LOOKUPVALUE(
table2[offset],
table2[date],
table1[date]
)
Hello @kman42
You can acheive this doing by following steps:
1. Create a Date Table by going to modelling and in the new table add the following dax:
3. Create a measure:
Let me know if you got this. Kudos!
There are various approaches. Regardless of which approach, you should get a calendar table.
https://exceleratorbi.com.au/power-bi-calendar-tables/
then you can either join the calendar table to bith of the tables to have (one to many), use the calendar table in your visual and then write a measure = sum(table1[amount]) + sum(table2[offset])
or, if it were me, and if the tables actually look like those you posted (ie, there's nothing your holding back and not telling me), I would do the following
in power query, create transform table 1 to be like
date, attribute, amount
1/1/24, "Amount", 450
etc
table 2, exactly the same headers but put "offset" as the attribute
append the 2 tables together and load a single table
still join to the calendar table as above.
you can simply drag the amount column into the values section and even use the attribute column in your visual.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
121 | |
97 | |
87 | |
70 | |
62 |
User | Count |
---|---|
138 | |
116 | |
114 | |
99 | |
98 |