Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello,
I am trying to create a DAX calculated column based on a column from a different table that has a relationship with the main table. I am experiencing some errors when trying to merge several tables with a SharePoint table. Is there a way to create a calculated column based on the relationship?
The two tables have relationship on ID and trying to create a calculated column on Table A based on a date column on Table B using IF function.
So is it possible to use IF function to reference a related table?
Left side is table1 and right side is table2.
| ID | Date1 | Calc Col | ID | Date2 | ||
| 1 | 1/1/2022 | IF(Date1==Date2, 1, 0) | 1 | 1/1/2022 | ||
| 2 | 3/1/2022 | IF(Date1==Date2, 1, 0) | 2 | 3/1/2022 | ||
| 3 | 4/2/2022 | IF(Date1==Date2, 1, 0) | 3 | 4/2/2022 |
Solved! Go to Solution.
Hi,
if i understood your problem you can try this calculated column
If this post is useful to help you to solve your issue consider giving the post a thumbs up
and accepting it as a solution !
Hi @cferv_77,
If you're having troubles with the relationships, you can disable it and try to apply manually using USERELATIONSHIP.
And then create a measure like this, you can also apply some conditional like you mentioned.
Measure =
CALCULATE(
SUM(Table1[Value]),
USERELATIONSHIP(Table1[Id],Table2[ID])
)
Hope it was helpful.
Regards,
Douglas.
Hi,
if i understood your problem you can try this calculated column
If this post is useful to help you to solve your issue consider giving the post a thumbs up
and accepting it as a solution !
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 40 | |
| 35 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 71 | |
| 70 | |
| 38 | |
| 35 | |
| 23 |