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
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!