Forum Discussion
mouzzampk
Nov 15, 2023Copper Contributor
DAX Count with MIN Date
Hi, I have Column A (Date) and Column B (Serial Number) Date Serial 01/02/2019 EA12891803 02/02/2019 EA12891804 03/02/2019 EA12891805 04/02/2019 EA12891806 05/02/2019 EA12...
- Nov 16, 2023
As variant for
assuming no other filters
Oldest Case:=MIN( 'Table'[Date] ) Weeks behind:=INT( (TODAY() - MIN( 'Table'[Date] ) )/7 ) In Queue:=VAR minDate=MIN( 'Table'[Date] ) RETURN COUNTROWS( FILTER( 'Table', 'Table'[Date] = minDate) )
Lorenzo
Nov 16, 2023Silver Contributor
Re. #1 Count Serial Number based on MIN date. Variants with the https://learn.microsoft.com/en-us/dax/countx-function-dax functions:
Count duplicates:
=COUNTX (
FILTER (
ALL ( 'Table' ),
'Table'[Date] = MINX ( ALL ( 'Table'[Date] ), [Date] )
),
[Serial]
)Count distincts:
=COUNTX (
DISTINCT (
FILTER (
ALL ( 'Table' ),
'Table'[Date] = MINX ( ALL ( 'Table'[Date] ), [Date] )
)
),
[Serial]
)