Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago

exclude blank rows in new table

I created an new table where i summarized the sale by product group.
Some product groups have no value.. what dax formula should I use in order to exclude them

thank you

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi

     

      Use the below Script and consider this measure as final one instead of the existing one.

     

    NewMeasure = CALCULATE(
        SUM( Table1[Value] )
        ,NOT( ISBLANK( Table1[Id] ) )
    )

    Replace the Table1 with your table or query name and id with your product Group column (which has no value or empty)

     

    Thanks

    Hari

  • v-ljerr-msft's avatar
    v-ljerr-msft
    Microsoft Employee

    Hi Anonymous,

     

    Could you post your table structures with some sample data, and the formula you're using to create the new summarized table?

     

    Based on my test, if I use SUMMARIZECOLUMNS Function (DAX) to create the summarized table, the product groups that have no value will be excluded by default. :smileyhappy:

     

    Summarize Table = SUMMARIZECOLUMNS ( Table1[Product group], "Total Sales", SUM ( Table1[sales] ) )
    

     

    Regards