Forum Discussion

Pbiuserr's avatar
Pbiuserr
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

How to handle blank values in visuals

Hello, 
Client insists on having N/A or something else instead of PBI's (blank) when there is no data (might occur at the beginning of each month). Is there any particular way to overcome this and create one measure where it would show N/A when blank, but it won't ruin charts? If there is N/A, the label of N/A is still visible in chart, but no value attached. So to sum up

1) Have N/A instead of (blank) on KPI cards
2) Not show category label on charts when value is N/A

 

in one measure? Sure I can copy one and do ISBLANK() but then I have to keep in mind that these are two separated measures representing same thing for both KPI and chart visuals

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Pbiuserr ,

    I have created a simple sample, please refer to my pbix file to see if it helps you.

    Create a measure.

    Measure = IF(ISBLANK(MAX('Table'[value])),"N/A",MAX('Table'[value]))

    Please try to use card instead of unsing KPI.

    I have also found a similar post, please refer to it to see if it helps you.

    POWER BI KPI Visualisation Text Value 

    • Go into Edit Queries and create a conditional column.
    • Create the Value and Target Calculated column that can be used in the visual as below.
    • The key here in these calculated columns are the usage of FORMAT.

    If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output more details.

     

    Best Regards

    Community Support Team _ Polly

     

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

     

     

2 Replies

  • Pbiuserr , in the measure you can use like

     

    if(isblank([Measure]), "N/A", [Measure]&"")

     

    make sure to use format on measure as that will become text post that

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Pbiuserr ,

    I have created a simple sample, please refer to my pbix file to see if it helps you.

    Create a measure.

    Measure = IF(ISBLANK(MAX('Table'[value])),"N/A",MAX('Table'[value]))

    Please try to use card instead of unsing KPI.

    I have also found a similar post, please refer to it to see if it helps you.

    POWER BI KPI Visualisation Text Value 

    • Go into Edit Queries and create a conditional column.
    • Create the Value and Target Calculated column that can be used in the visual as below.
    • The key here in these calculated columns are the usage of FORMAT.

    If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output more details.

     

    Best Regards

    Community Support Team _ Polly

     

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