Forum Discussion
Min value count data in DAX
- 9 years ago
I really think these should work! :smileyhappy:
NEW Measure (Min Status) = CALCULATE ( MIN ( 'NewTable'[Item Status] ), ALLEXCEPT ( 'NewTable', 'NewTable'[Item], 'NewTable'[Id] ) )
NEW Measure (Count of Status) = CALCULATE ( COUNTA ( 'NewTable'[Item Status] ), FILTER ( 'NewTable', 'NewTable'[Item Status] = [NEW Measure (Min Status)] ), ALLEXCEPT ( 'NewTable', 'NewTable'[Item], NewTable[Id] ) )Good Luck!:smileyhappy:
Sean ,
Thanks for your quick reply and DAX calculation its near up to the solution, its really helpful but for multiple id and total count is not matched.
Here ID should be 2,3,4.... like wise and total (Measure (Count of Status )) should be match with total Item count like as below
Item 1 has Item Status 0 as a Min
Item 2 has Item Status 1 as a Min
Item 3 has Item Status 2 as a Min
Item 4 has Item Status 0 as a Min
Item 5 has Item Status 1 as a min
So
total 5 items and I
Item Status 0 = 2
Item Status 1 = 2
Item Status 2 = 1
So total should be 5 at the end
In sample data it works ut in case of multiple ID its not working. while selecting id
I think there should be minor change in calculation so here you can help out.
If possible pls help here
Thanks once again :)
Note:-1 It should be distinct count
I really think these should work! :smileyhappy:
NEW Measure (Min Status) = CALCULATE ( MIN ( 'NewTable'[Item Status] ), ALLEXCEPT ( 'NewTable', 'NewTable'[Item], 'NewTable'[Id] ) )
NEW Measure (Count of Status) = CALCULATE ( COUNTA ( 'NewTable'[Item Status] ), FILTER ( 'NewTable', 'NewTable'[Item Status] = [NEW Measure (Min Status)] ), ALLEXCEPT ( 'NewTable', 'NewTable'[Item], NewTable[Id] ) )
Good Luck!:smileyhappy: