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!View all the Fabric Data Days sessions on demand. View schedule
I have a DAX calculation that perfectly works when using single table, now I ned to select columns across two tables bu I am getting error. Attaches is a screenshot. I would love if I can get help on this. Thanks.
Solved! Go to Solution.
Hi @Anonymous ,
If you are using a measure , you cannot directly reference a column in a table in a measure, you need to use a function to apply to a table column.
If you are using calculated columns, if there is a correspondence between the two tables (such as one-to-many), you can use the related() function to refer to a column in another table.
e.g:related(Alertsvulns[Created Date])
Best Regards,
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
If you are using a measure , you cannot directly reference a column in a table in a measure, you need to use a function to apply to a table column.
If you are using calculated columns, if there is a correspondence between the two tables (such as one-to-many), you can use the related() function to refer to a column in another table.
e.g:related(Alertsvulns[Created Date])
Best Regards,
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
please try
OOSLA =
VAR _Today =
TODAY ()
VAR _Date =
SELECTEDVALUE ( Alertsvulns[Created Date] )
VAR _Severity =
SELECTEDVALUE ( Machinevulns[severity] )
VAR _DiffDays = _Today - _Date
RETURN
SWITCH (
TRUE (),
_Severity = "Medium"
&& _DiffDays >= 90, _DiffDays - 90,
_Severity = "Low"
&& _DiffDays >= 120, _DiffDays - 120,
_DiffDays >= 30, DiffDays - 30,
_Severity = "Critical"
&& _DiffDays >= 30, _DiffDays - 30
)
@tamerj1 Thanks for the respons. This throws no error but all the calculaton turns out to be 0.
@Anonymous
Please try
OOSLA =
VAR _Severity =
SELECTEDVALUE ( Machinevulns[severity] )
VAR _DiffDays =
SUMX ( Alertsvulns, DATEDIFF ( Alertsvulns[Created Date], TODAY (), DAY ) )
RETURN
SWITCH (
TRUE (),
_Severity = "Medium"
&& _DiffDays >= 90, _DiffDays - 90,
_Severity = "Low"
&& _DiffDays >= 120, _DiffDays - 120,
_DiffDays >= 30, DiffDays - 30,
_Severity = "Critical"
&& _DiffDays >= 30, _DiffDays - 30
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 9 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 28 | |
| 20 | |
| 20 | |
| 19 | |
| 12 |