Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All, running into a problem with figuring out where I should be using userelationship in my formula for a calculated column. I'm trying to use an inactive relationship I have with my date table and my date recieved column. Below is what I'm using now which returns from another table my date recieved. Any help would be appreciated.
=CALCULATE ( FIRSTNONBLANK ( Receiving Table[Date Received], 1 ), FILTER ( ALL ( Receiving Table ), Receiving Table[Item Number] = 'PO Table'[Item Number] && Receiving Table[PO Number] = 'PO Table'[PO Number])
Thanks
Kevin
Solved! Go to Solution.
ok @Anonymous
so update the arguments of USERELATIONSHIP with the columns involved on the inactive relationship you want to activate. which ones are they? I don't have the data model.
Hi @Anonymous
You can use the USERELATIONSHIP within the CALCULATE, something like shown below. Although I am not sure this is exactly what you are after??
CALCULATE ( FIRSTNONBLANK ( 'Receiving Table'[Date Received], 1 ), FILTER ( ALL ( 'Receiving Table' ), 'Receiving Table'[Item Number] = 'PO Table'[Item Number] && 'Receiving Table'[PO Number] = 'PO Table'[PO Number] ) USERELATIONSHIP('Receiving Table'[Date Received], 'Date'[Date]) )
Thanks for your quick reply @AlB. Your suggestion was what first came to mind, and as a result I recieve the following error:
USERELATIONSHIP function can only use the two columns references participating in relationship.
Hi @Anonymous,
You could have a good look at this document about how to use Userelationship.
If you still need help, please share some data sample and your desired output so that we could help further on it.
For reference, there is a blog Dealing with Inactive Relationships in Power BI which may be helpful to you.
Best Regards,
Cherry
Thanks everyone for your suggestion. It was actually @AlB's suggestion that made somehow made me think to recheck my relationships, and there I found where was my problem.
Hi @Anonymous,
It seems that you have solved your problem.
If you have solved, please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
Best Regards,
Cherry
ok @Anonymous
so update the arguments of USERELATIONSHIP with the columns involved on the inactive relationship you want to activate. which ones are they? I don't have the data model.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
97 | |
78 | |
64 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |