cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
mapet
New Member

Get monthly price froma separate table

Dears, 

 

I have two tables: 

1. Total Hourly Cons (it contain hourly energy consumtion data)

mapet_0-1640617004044.png

2. Energy Price (it contain monthly energy price):

mapet_1-1640617127839.png

 

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.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@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])

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@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])

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors