Forum Discussion
Anonymous
2 years agoNot applicable
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 ...
- 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
Greg_Deckler
2 years agoCommunity Champion
Anonymous Here's one more solution, PBIX is attached.
Column =
VAR __Date = [Order Date]
VAR __Result = COUNTROWS( FILTER( 'Table', [Order Date] = __Date ) )
RETURN
__Result- Anonymous2 years agoNot applicable
actually, calculated column should count on number of products and based on the corresponding date. if apple and samsung present data in some other day that should give value on that day only.
- Greg_Deckler2 years agoCommunity Champion
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