Forum Discussion

Sania-F's avatar
Sania-F
Resolver I
2 years ago
Solved

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 part...
  • Sania-F's avatar
    2 years ago

    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.