remove the blank rows in DAX

216 Views Asked by At

I have a code as below and I have empty cells in @Rate column. How can I get rid of the blank rows using DAX? Many thanks in advance.

   Sales USD (Daily) :=
    VAR AggregatedSalesInCurrency =
        ADDCOLUMNS (
            SUMMARIZE (
                Sales,
                'Date'[Date],                 -- Day granularity
                'Currency'[Currency]
            ),
            "@SalesAmountInCurrency", [Sales (Internal)],
            "@Rate", CALCULATE (
                SELECTEDVALUE ( 'Daily Exchange Rates'[Rate] )
            )
        )
    VAR Result =

SUMX (
        FILTER(AggregatedSalesInCurrency,  [@Rate] <> 0),
        [@SalesAmountInCurrency] / [@Rate]
    ) 

RETURN
{Result} // in daxstudio use {} 
1

There are 1 best solutions below

3
On BEST ANSWER
SUMX (         
   FILTER(AggregatedSalesInCurrency,  [@Rate] <> 0),  
  [@SalesAmountInCurrency] / [@Rate]     
)