Forum Discussion

zahlenschubser's avatar
3 years ago
Solved

Show zero as blank in visual

I want to show zeros as blank in a visual, but I cannot use conditional text formatting to white because of the alternating colors in the rows.

The database is values in period columns, so I don't have a single column as a base for the visual.

 

And I can't replace zero with blank in the query editor because that will error the decimal formatted columns.

 

Any ideas?

  • DataInsights's avatar
    DataInsights
    3 years ago

    zahlenschubser,

     

    You need to use "unpivot columns" in Power Query so you have one column for Date and one column for Amount.

3 Replies

  • zahlenschubser,

     

    Try this measure:

     

    Amount = 
    VAR vAmount =
        SUM ( Table1[Amount] )
    VAR vResult =
        IF ( vAmount = 0, BLANK (), vAmount )
    RETURN
        vResult

     

    In the Values field well, click the down arrow for Amount and select "Show items with no data":

     

     

     

    • zahlenschubser's avatar
      zahlenschubser
      Icon for Helper IV rankHelper IV

      That would mean that I need a measure for every separate column. Isn't there a better solution?

      • DataInsights's avatar
        DataInsights
        Icon for Super User rankSuper User

        zahlenschubser,

         

        You need to use "unpivot columns" in Power Query so you have one column for Date and one column for Amount.