Forum Discussion
Anonymous
8 years agoNot applicable
DAX for MIn/Max based on count
Hello All, Need hep! I need to dispay (on card tile) min and max hour when the count of crime is min and max. Hour is on x axis and crime # on y axis. In this example I need to dispay max time as...
- 8 years ago
Hi Anonymous
Check this file here
Try this
Time_MaxCrime = VAR MaxCount = MAXX ( VALUES ( Table1[Time] ), CALCULATE ( COUNT ( Table1[Crime Type] ) ) ) RETURN CALCULATE ( CONCATENATEX ( FILTER ( VALUES ( Table1[Time] ), CALCULATE ( COUNT ( Table1[Crime Type] ) = MaxCount ) ), Table1[Time] ) )
Anonymous
8 years agoNot applicable
oh, you are correct, Zubair_Muhammad
Is there any way we could handle this situation? Could we show just one value in this case?
Please advise, thanks!
Anonymous
8 years agoNot applicable
One more observation:- It doesn't show value when crime is 0. But it shows the value for 1 i.e. when crime is 1 at 18 and 1 at 16 so it shows 1816. Actually it should show value for 0 and not 1. Also the min function is not working when all crimes are selected and works when one crime selected as above case.
Do you have any further idea for this? Please advise.
Thanks!