Forum Discussion

cchp07's avatar
cchp07
Frequent Visitor
7 years ago
Solved

DAX-If value is blank then put value else put value

I am trying to create a measure that would look at a matrix that has dates for the rows and ID's for the columns and for the value, it is a measure that summed the max of another value based on the date and ID, but for some dates and ID's there are 0's and I want them to show the value instead(max of another value based on the date and ID). 

Is this possible in Power BI with DAX?

EX:( IF value is blank based on this date and ID, Value, Value)

 

 

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi there, i think you are looking for some conditional formula.  Something like:

    IF(AND(ID>0,Date>0), sum(ID1),sum(ID2))

     

    I didn't check the syntax exactly but hope that helps.

    • cchp07's avatar
      cchp07
      Frequent Visitor

      Anonymous  

       

      Thanks for the tip, but it is more if the value is 0 then change it to that actually value otherwise leave the value compared to ID and Date.

       

      If that makes sense. 

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi there, i think you can accomplish the same with the DAX i provided?  Happy to help if you give some sample data with expected results.