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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Sania-F
Resolver I
Resolver I

hide complete text or partial text in textbox based on certain conditions

So, I had 2 requirements

 

1. If only one value is selected in slicer, Hide  all sentences that I had.

I had slicer called - Bucket. bucket values->  10M,20M,30M 

 

2. Show/hide complete or partial text in text box based on certain conditions.

 

-if country and industry both are not blank, show values for both 

-if country is blank, show industry values

-if industry both is blank, show country values  

- if country and industry both are blank, show blank

1 ACCEPTED SOLUTION
Sania-F
Resolver I
Resolver I

Hi,

 

So here whats I Implemented.

 

rev_Across_country_Industry_JoinTbl =

    var Bucket_Filter= HASONEFILTER(Bucket_Filter[Bucket])

    VAR Country_Industry =

        CONCATENATEX(

            FILTER(

                VALUES( Country_Industry_CrossJoin[Country_Industry]),

                [Rev] < -20 &&

                [Rev%] < -0.06

            ),

            Country_Industry_CrossJoin[Country_Industry],

            ", "

        )

    VAR VIP_client=

         CONCATENATEX (

        FILTER (

            Client,

            client[Clientid] IN { 2,3 } &&

            [Rev] < -20 &&

            [Rev%] < -0.06

        ),

       client[clientName],

        ", "

    ) --& " account"

    RETURN

        --COuntry_industry

    if(HASONEFILTER(DimBucket[Bucket]), blank(),

         IF (

            NOT ISBLANK(Country_Industry) && NOT ISBLANK(VIP_client),

            "• Requiring attention country and industry " & Country_Industry & ", as well as the " & VIP_client & " account",

                if(NOT ISBLANK(Country_Industry) &&  ISBLANK(VIP_client),

                "• Requiring attention are/is the Country_Industry " & Country_Industry,

                    if(ISBLANK(Country_Industry) && NOT  ISBLANK(VIP_client),  "• Requiring attention are/is the " & VIP_client & " account",blank() )

                    )

           

        )

       

)



HASONEFILTER => to hide all sentences
if conditions placed within one another carefully as the way I wanted them to be evaluated. If not placed properly they wont function as expected.

View solution in original post

2 REPLIES 2
Sania-F
Resolver I
Resolver I

Hi,

 

So here whats I Implemented.

 

rev_Across_country_Industry_JoinTbl =

    var Bucket_Filter= HASONEFILTER(Bucket_Filter[Bucket])

    VAR Country_Industry =

        CONCATENATEX(

            FILTER(

                VALUES( Country_Industry_CrossJoin[Country_Industry]),

                [Rev] < -20 &&

                [Rev%] < -0.06

            ),

            Country_Industry_CrossJoin[Country_Industry],

            ", "

        )

    VAR VIP_client=

         CONCATENATEX (

        FILTER (

            Client,

            client[Clientid] IN { 2,3 } &&

            [Rev] < -20 &&

            [Rev%] < -0.06

        ),

       client[clientName],

        ", "

    ) --& " account"

    RETURN

        --COuntry_industry

    if(HASONEFILTER(DimBucket[Bucket]), blank(),

         IF (

            NOT ISBLANK(Country_Industry) && NOT ISBLANK(VIP_client),

            "• Requiring attention country and industry " & Country_Industry & ", as well as the " & VIP_client & " account",

                if(NOT ISBLANK(Country_Industry) &&  ISBLANK(VIP_client),

                "• Requiring attention are/is the Country_Industry " & Country_Industry,

                    if(ISBLANK(Country_Industry) && NOT  ISBLANK(VIP_client),  "• Requiring attention are/is the " & VIP_client & " account",blank() )

                    )

           

        )

       

)



HASONEFILTER => to hide all sentences
if conditions placed within one another carefully as the way I wanted them to be evaluated. If not placed properly they wont function as expected.

amitchandak
Super User
Super User

@Sania-F , Create one or more measure like this and use in text box

 

If(isfiltered(Table[Country]) && isfiltered(Table[Industry]) , [Bucket Value measure], blank())

 

or

 

If(not(Isblank(Max(Table[Country]))) && not(Isblank(Max(Table[Industry]))) , [Bucket Value measure], blank())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.