Forum Discussion

dmbd1904's avatar
dmbd1904
Icon for Helper III rankHelper III
6 years ago
Solved

Blanks as Nulls in Matrix

Hi I'm trying to convert blank values in my matrix to Zero's. The table looks as follows:

 

Forecast = CALCULATE(DISTINCTCOUNT(Task[UniqueTaskID]))

 

 

I tried to create another measure as 

Forecast in Period = IF(ISBLANK([Forecast]),0,[Forecast])
but this returns the folowing tables with Rows repeated for some reason - It seems it's take Row names from other projects which have been filtered out.
 
 

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    dmbd1904 

    Adding +0 to the end of your measure is one quick way to fix this

     

    Forecast = CALCULATE(DISTINCTCOUNT(Task[UniqueTaskID]))+0

     

     

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

     

9 Replies

      • dmbd1904's avatar
        dmbd1904
        Icon for Helper III rankHelper III

        Hi amitchandak , I'm not sure I understand but is that what's causing the problem? Is there anyway to avoid the problem?

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    dmbd1904 - Generally that is:

    Measure =
      VAR __Calc = <some calculation>
    RETURN
      IF(ISBLANK(__Calc),0,__Calc)
    • dmbd1904's avatar
      dmbd1904
      Icon for Helper III rankHelper III

      Hi Greg_Deckler  , i tried that and got the same problem. See the image in my reply (It wouldn't let me include in the original post)

  • Anonymous's avatar
    Anonymous
    Not applicable

    dmbd1904 

    Adding +0 to the end of your measure is one quick way to fix this

     

    Forecast = CALCULATE(DISTINCTCOUNT(Task[UniqueTaskID]))+0

     

     

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