Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Exclude null value in grand total calculation

How to exclude or blank records from below DAX Calculation? % of Grand Total = DIVIDE ( SUM ('OD Database'[sales]), CALCULATE ( SUM ( 'OD Database'[sales]), ALL ( 'OD Database'[Trip Commodity Converted] )) ) Regards

4 Replies

  • Anonymous , The information you have provided is not making the problem clear to me. Can you please explain with an example.

    Appreciate your Kudos.


     

    • Anonymous's avatar
      Anonymous
      Not applicable

      From the below screenshot, 83 % of trips are present with blank rows, I want to exclude the blank rows and then calculate the Grand total?

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Blanks would automatically beexcluded from the source. if you want to avoid a BLANK value when certain filters are applied, then simply add +0 right at the end and BLANK becomes 0

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Could you provide sample data? For now, I guess it may be because you have two tables, and then because of incomplete data in one table.

     

     

    Best Regards,

    Stephen Tao

     

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