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.
Current I have 2 tables in my POWERBI desktop report.
Table 1 with 1 record per Day
Table 2 has multiple records for 1 day
They are related with a One to Many relationship.
I need to create a measure in Table 2 that looks at a field. 'Table2(Max Tempature) and if that is Null then replace it with the 'Table1'(Max Tempature).
Solved! Go to Solution.
You need to create calculated column ( Not calculated Measure ).
Thanks
Raj
Hi @kdixon5490
You need to use RELATED function for this use case, which needs row context. So, you need to create a calculated column. Pls make sure to have a relationship between both columns.
Create the calculated column using the below formula. Example is given below.
Thanks
Raj
I typed in the information given and I'm getting the following error...
EARLIER/EARLIEST refers to an earlier row context which doesn't exist.
You need to create calculated column ( Not calculated Measure ).
Thanks
Raj
Hi,
Create a relationship from the Date column of Table2 to the Date column of Table1. In Table2, write this calculated column formula
=if(isblank('Table2'[Max empature]),related('table1[Max tempature]),'Table2'[Max empature]))
or
=coalesce('Table2'[Max empature],related('table1[Max tempature]))
The second one is better.