Forum Discussion
Elzzie
2 years agoFrequent Visitor
Check column from another table if it contains two values, and return a different string as result
Hi community, I'm quite new to powerbi, and have a specific usecase I cannot figure out. I hope you can help me out here. I have the following two tables: Event EventID EventName 1 ...
- 2 years ago
Elzzie PBIX is attached below signature.
GuestLocation = VAR __Table = SUMMARIZE( RELATEDTABLE(Guest), [GuestLocation] ) VAR __Rows = COUNTROWS( __Table ) VAR __Result = IF( __Rows = 1, MAXX( __Table, [GuestLocation] ), "Multiple (" & __Rows & ")" ) RETURN __Result
Greg_Deckler
Community Champion
2 years agoElzzie PBIX is attached below signature.
GuestLocation =
VAR __Table = SUMMARIZE( RELATEDTABLE(Guest), [GuestLocation] )
VAR __Rows = COUNTROWS( __Table )
VAR __Result =
IF(
__Rows = 1,
MAXX( __Table, [GuestLocation] ),
"Multiple (" & __Rows & ")"
)
RETURN
__Result