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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
snaraya
Helper II
Helper II

Dynamic text value for single slicer value

I have a status table(manulaly created) as below which has extra value "Review" which is not avalaible in actual data table but have all other values.

 

STATUS TABLE                                                           
Status              Rank

Send1
Investigation2
Review3
Approval4
Closed5
Cancelled6

 

TABLE (has below status column but with lots of duplicate values)

Closed
Cancelled
Approval
Send
Investigation

 

 

I am using this status column from status table as a slicer in my visual page. This slicer and my actual data from table have 1-many relationship

 

I want to create a measure which shows dynamic text "There are no Emergency Messages in the (selected value) workflow Stage" if status value is not avaialble in table but available in Status table.  message should pop only when non matching status is selected individually or with other values. (it should be dynamic as per selection)

 

I created below formula

 

test = IF(SELECTEDVALUE('Status'[Status])=SELECTEDVALUE(table[Status])," ", "There are no Emergency Messages in" & " "&SELECTEDVALUE('Status'[Status])& " "& "workflow stage")

Please find below example 

it works fine if i am selecting only review(its non matching here) but if i select 1more status along with review it shows "There are no Emergency Messages in the workflow Stage". and if i select 3 status out of which one is review it dont show anything.
i want it to be shown the same message as 1st secreenshot for 2nd and 3rd screenshot and not show anything if something else is individualy selected (4th screenshot)
 
What i have: 1st and last screenshot are correct 
what i want: 2nd and 3rd screenshot should show same message as 1st 
 
Please find below example 
 
snaraya_0-1689840570705.pngsnaraya_1-1689840841677.png snaraya_2-1689840884173.pngsnaraya_3-1689840964340.png

also using background color change on basis of same

BG = SWITCH(TRUE(), SELECTEDVALUE('Status'[Status])=SELECTEDVALUE(table[Status]),"White","Red")
 
I am partially there , can someone suggest what should be tweaked in my formula?

Thanks in Advance
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @snaraya ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a measure. 

test = IF(CONCATENATEX(EXCEPT(VALUES('STATUS'[Status]),ALLSELECTED('Table'[Status])),[Status]," ")<>BLANK(),"There are no Emergency Messages in" & " "&CONCATENATEX(EXCEPT(VALUES('STATUS'[Status]),ALLSELECTED('Table'[Status])),[Status]," ")& " "& "workflow stage","")

(3) Then the result is as follows.

vtangjiemsft_0-1690182216443.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
snaraya
Helper II
Helper II

@Anonymous  Thankyou so much. Worked perfectly fine.😊

Anonymous
Not applicable

Hi @snaraya ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a measure. 

test = IF(CONCATENATEX(EXCEPT(VALUES('STATUS'[Status]),ALLSELECTED('Table'[Status])),[Status]," ")<>BLANK(),"There are no Emergency Messages in" & " "&CONCATENATEX(EXCEPT(VALUES('STATUS'[Status]),ALLSELECTED('Table'[Status])),[Status]," ")& " "& "workflow stage","")

(3) Then the result is as follows.

vtangjiemsft_0-1690182216443.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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