cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Thackeb
Helper I
Helper I

Create a default measure with no selection when no blank is in the field name.

I want a default message on a card when a slicer option is not selected.

If my field name has a blank as an option, I can use this successfully:

Default Sales Role Code Segment =

IF(ISFILTERED(Customer[Sales Role Code]),

FIRSTNONBLANK(Customer[Sales Role Code],Customer[Sales Role Code]),

"None Selected")

If my field doesn't have a blank as an option, the above shows the first name.  

 

Example of field options: 

Sales Role Code = blank, ENT, STA, SMB

Channel Name = Carton, FoodService,VMG

 

I'm struggling to rewrite the above measure with no success. Any help is greatly appreaciated. (Please note that I cannot create calculated columns as my tables are read only. This inhibits some Dax creation.)

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Thackeb not sure why you are doing FIRSTNONBLANK

 

Test = SELECTEDVALUE ( Customer[Sales Role Code], "None Selected" )

 

Follow us on LinkedIn

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@Thackeb it is a measure.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





parry2k
Super User
Super User

@Thackeb not sure why you are doing FIRSTNONBLANK

 

Test = SELECTEDVALUE ( Customer[Sales Role Code], "None Selected" )

 

Follow us on LinkedIn

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Thank you! Yes, I made this much more difficult. You are awesome!

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors