The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Dears,
I have two tables:
1. Total Hourly Cons (it contain hourly energy consumtion data)
2. Energy Price (it contain monthly energy price):
The scope is to add a colum in the first table that contain the price for the coresponding set of month & year, based o matching colums "date" of the first table and "month" of the second table. An many to one relationship betwen "Date" and "Month" is already established.
I've already had a try with
Column = RELATED(EnergyPrice[Price])
but it is only returning values for fixed dates (01.01.2020).
Any advice?
Later edit:
I've added in the first table an "start of month" column" and now the
Column = RELATED(EnergyPrice[Price])
is providing what i need.
Is there any other sollution?
Best regards.
Solved! Go to Solution.
@mapet , month seem to be using start date of the month
a new column in table one
maxx(filter(Table2, eomonth(Table2[Month],0) = eomonth(table1[Date],0)) , Table2[Price])
@mapet , month seem to be using start date of the month
a new column in table one
maxx(filter(Table2, eomonth(Table2[Month],0) = eomonth(table1[Date],0)) , Table2[Price])
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
13 | |
8 | |
8 |