Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Calculated column DAX

Hi,   I have below table and wanted to create calculated column as expected results in the box.   Any help. Sr No Product Order Date Apple qty Samsung Qty Nokia qty Calculated Column ...
  • Greg_Deckler's avatar
    Greg_Deckler
    2 years ago

    Anonymous So like this?

    Column = 
        VAR __Date = [Order Date]
        VAR __Table = FILTER( 'Table', [Order Date] = __Date ) )
        VAR __Result = COUNTROWS( DISTINCT( SELECTCOLUMNS( __Table, "Product", [Product] ) ) )
    RETURN
        __Result