Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Comments for filters

Hi Guys,   I need a measure where if my filter is selected i need my comments(Which are in Multiple line) else i need blank.   Basically if i am using Max, i am getting the top comments, i am not...
  • Anonymous's avatar
    Anonymous
    7 years ago

    HI Anonymous ,

    You can use following measure formula to achieve your requirement:

    Dynamic comment = 
    IF (
        COUNTROWS (
            EXCEPT ( ALL ( T1[Region Name] ), ALLSELECTED ( T1[Region Name] ) )
        ) > 0,
        CONCATENATEX ( VALUES ( T1[Region Comments] ), [Region Comments], "," ),
        CONCATENATEX ( VALUES ( T2[Region Comments] ), [Region Comments], "," )
    )
    

    Notice:

    1. T1 is sheet1, T2 is sheet2.

    2. Current power bi can't find out the difference between 'all selected' and 'unselected', so measure formula will recognize 'all selected' and 'unselected' as 'unselect'.

    Regards,

    Xiaoxin Sheng