Forum Discussion
Anonymous
5 years agoNot applicable
USERELATIONSHIP doesn't work
I need a simple USERELATIONSHIP formula to work and I have no idea why it doesn't. Please find an example here: report There are 2 tables with one active and one non-active relationship. I've ...
- 5 years ago
Anonymous
Tricky. You could do something like this:
CALCULATION = CALCULATE ( CALCULATE ( DISTINCT ( 'DIM Rooms'[Used for] ), 'Room data' ), USERELATIONSHIP ( 'Room data'[Room # ADJUSTED], 'DIM Rooms'[Room only] ), ALL ( 'DIM Rooms' ) )but it's quite complex. Best use LOOKUPVALUE:
CALCULATION V2 = LOOKUPVALUE( 'DIM Rooms'[Used for] , 'DIM Rooms'[Room only], 'Room data'[Room # ADJUSTED])Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Anonymous
5 years agoNot applicable
Hi AlB ,
Thank you for this!
Still, do you have an Idea why it might not work?
I'm trying to find a clue why this more complex formula suggested by you should be used.
Thank you.
AlB
5 years agoCommunity Champion
Anonymous
Check this out
https://www.sqlbi.com/articles/userelationship-in-calculated-columns/
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers