Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

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 gettingthe complect commentsAnswer Which i am getting.PNG

 

Attached is the screenshot.

 

Thanks in advance for your support

 

Regards,
NageshScreenshot.PNG

1 ACCEPTED SOLUTION

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], "," )
)

69.gif

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

5 REPLIES 5
v-shex-msft
Community Support
Community Support

HI @Anonymous ,

I'm not so clear for your comment tables, can you please explain more about these?

How to Get Your Question Answered Quickly
In addition you can also try to use following measure formula if it works:

Measure =
IF (
    ISINSCOPE ( Region[Region] ),
    CONCATENATEX (
        FILTER (
            ALLSELECTED ( 'Region Comment' ),
            [Region] IN VALUES ( Region[Region] )
        ),
        [Comment Column],
        ";"
    ),
    CONCATENATEX (
        FILTER (
            ALLSELECTED ( 'Group Comment' ),
            [Region] IN VALUES ( Region[Region] )
        ),
        [Comment Column],
        ";"
    )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi @v-shex-msft ,


@v-shex-msft wrote:

HI @Anonymous ,

I'm not so clear for your comment tables, can you please explain more about these?

How to Get Your Question Answered Quickly
In addition you can also try to use following measure formula if it works:

Measure =
IF (
    ISINSCOPE ( Region[Region] ),
    CONCATENATEX (
        FILTER (
            ALLSELECTED ( 'Region Comment' ),
            [Region] IN VALUES ( Region[Region] )
        ),
        [Comment Column],
        ";"
    ),
    CONCATENATEX (
        FILTER (
            ALLSELECTED ( 'Group Comment' ),
            [Region] IN VALUES ( Region[Region] )
        ),
        [Comment Column],
        ";"
    )
)

Regards,

Xiaoxin Sheng



@v-shex-msft wrote:

HI @Anonymous ,

I'm not so clear for your comment tables, can you please explain more about these?

How to Get Your Question Answered Quickly
In addition you can also try to use following measure formula if it works:

Measure =
IF (
    ISINSCOPE ( Region[Region] ),
    CONCATENATEX (
        FILTER (
            ALLSELECTED ( 'Region Comment' ),
            [Region] IN VALUES ( Region[Region] )
        ),
        [Comment Column],
        ";"
    ),
    CONCATENATEX (
        FILTER (
            ALLSELECTED ( 'Group Comment' ),
            [Region] IN VALUES ( Region[Region] )
        ),
        [Comment Column],
        ";"
    )
)

Regards,

Xiaoxin Sheng


Hi @v-shex-msft 

Please ignore the above image.

 

I have two page, 1st page with region and their comments and 2nd page with Group comments.

 

I have region in filter in all Tab. Now if I don’t select filter I need the comments from 2nd page, Incase if I select the filter for region I need comments from page 1 with particular filter.

 

unfortunatly i dont have access to any dropbox or external mail ID.

 

Please let me know if i need to be more detailed.

Hi @Anonymous ,

Can you please share some fake data with same data structure and copy them to your post with table format?(copy them to excel, then copy correspond worksheet cell range and paste to your post) It will help for test to coding formula.

Sample:

table1

Test Test2
123 231
123 123

table2

Test Test2
123 231
123 123

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable



Hi @v-shex-msft 

i have 5 region in filter, in Sheet 1.

Sheet 1  
Region NameRegion Comments
Asfghrfgnhg yhethfbfghgfgyjhmghjfgdh
Adfhrgjdfgxfgchbhhfghnfmkghjhcgxfgbfhgk
Bfbjkvdfbv
Bsdfvgdfbfg
Csvdbfnbfgbh
Dfbgghdnfhk,ylhdvgbdf
Esdfgdjhndgbdgf

 

In sheet 2,

Sheet 2 
Region Name
Globaldsvsfvgasdmkfvkgsb f
Globaldcakhfgvsrdfjsadhgfv

 

I have 5 region, incase if nothing is selected i need Sheet2 global comments in one pragraph, 

incase if some region is selected then i need sheet 1 comments for that particular region.

 

Thanks for your support and help.

 

Regards,

Nagesh

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], "," )
)

69.gif

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.