Forum Discussion
USERELATIONSHIP doesn't work
- 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
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
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.
- AlB5 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