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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bdehning
Post Prodigy
Post Prodigy

Need Measure to produce Unknown

I have a Table shown below.

bdehning_0-1674229593068.png

I have two columns Class Code and Description.  Description is filled in based upon What is in Class Code.   Class Code and Description are ocassionally blank.  

 

I was able to create a Conditional Column to create output of Unknown, if Class Code was null.

 

What measure do I need or how to get Description to show Unknown and not null?    There are no null values in Descriprion Column in the table. 

 

 

 

4 REPLIES 4
LQuedas
Resolver II
Resolver II

 Hi @bdehning ,

 

just to have a better understood of your problem, so the "class code" and "Description" are fields from different tables and you want to set the value of the "Description" to "Unknown" when the "Class Code" has "Unknown" as well, am I right? 

Do those two tables where "class code" and "Description" are stored have a relationship? can you provide a screenshot of the data model with the tables visible? 

 

Thanks, LQ

v-yiruan-msft
Community Support
Community Support

Hi @bdehning ,

You can create a measure as below to get it, please find the details in the attachment.

Measure = 
VAR _selcode =
    SELECTEDVALUE ( 'Table'[Class Code] )
RETURN
    IF ( _selcode=BLANK(), "Unknown", _selcode )

yingyinr_0-1674451665957.png

Best Regards

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

It is not really working.  I need the Unknown to appear in the Description column and in my Visual Class Code and Description come from two different tables and I have to choose Last Descriptionm when place under Columns.  

Hi @bdehning ,

Could you please provide some raw data in those two tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? Is there any relationship between them? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors