Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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.
User | Count |
---|---|
98 | |
76 | |
76 | |
48 | |
26 |