Forum Discussion

Miguelcrz's avatar
Miguelcrz
Icon for Helper I rankHelper I
6 years ago
Solved

Replace cells measure

Hi!

 

I need to replace the cells that have "infinity" with another word like "No sales". The table that has infinity is a variation %

 

 

Thanks!!

  • HI Miguelcrz ,

     

    Modify your DAX expression to as follows:

    Calc = DIVIDE(sales A, Sales B, 0) - 1

     

    Also Power BI doesn't allow multiple datatypes in a single column. You will have to either have them as ZEROES which the DIVIDE function handles in Power BI.

     

    Thanks,

    Pragati

4 Replies

  • Hi Miguelcrz ,

     

    Is this variation % calculated any dax expression or it is coming directly from source data?

     

    Thanks,

    Pragati

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

        HI Miguelcrz ,

         

        Modify your DAX expression to as follows:

        Calc = DIVIDE(sales A, Sales B, 0) - 1

         

        Also Power BI doesn't allow multiple datatypes in a single column. You will have to either have them as ZEROES which the DIVIDE function handles in Power BI.

         

        Thanks,

        Pragati

  • Miguelcrz , Power bi does not allow variable data type. In means, you need to make it text ane also take care of data format.

     

    If it coming power bi then use divide function in place of /

    If it coming from source, what is the data type of column