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
Chitemerere
Responsive Resident
Responsive Resident

Replace Blank legend in a chart with "NA"

I have a survey in which respondent fill a survery form through Microsoft forms with data captured as real time data as a Power BI Dataset via Microsoft Flow and then used to visualize the data.  I have the following visual:

 

PMQS PART OF QMS.PNG

 

The respondents are answering "YES" or "NO" on the question visualized above, but some respondents will have an option not to answer this question depending on their status and thus have no legend in the visual above.  Can the 'Blank' legend above labelled as "NA" and if so how can this be done.

 

Regards,

Chris

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

Try this calculated column formula

=if(isblank(Data[Answer]),"NA",Data[Answer])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish

 

Thank you very much for your response.  I am using a Power BI Service "Dataset" as a data source.  Is it possible to create a calculated column using such a data source.  I seem not to see how to do this.

 

Regards,

Chris

Hi @Chitemerere ,

 

Since you are connected to the Power BI dataset ( Live Connection mode ), you can not create calculated columns, so you can not change the null value into 'NA' in the slicer.

But you can open this dataset in Desktop and create a calculated column, then republish it to the service again, and then connect.

Or directly modify the original data.

 

Best regards,
Lionel Chen

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

 

Hi Lionel

 

I am not sure how i can open this dataset in Desktop and create a calculated column, then republish it to the service again, and then connect.

 

Thank you for your assistance in advance.

 

Chris

Hi @Chitemerere ,

 

What I mean is to modify the original .pbix file first. 

Or you can directly connect to the data source of this dataset?

 

Best regards,
Lionel Chen

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

Thanks Lionel

 

Regards,

Chris

marceloVVR
Helper I
Helper I

One possibility would be to create a column in the same table and assign it with if.

IF(table[answer]="Yes","Yes",IF(table[answer]="Not","Not","NA"))

 

Thank you very much for your response.  My data source is a "Dataset", can one create a column in the dataset?  I seem not to be able to see how can this be done with a Power BI Dataset created in Power BI Service

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.