Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Community,
I'm tring to use the max() function combinated with count().
max([date import]) : gives me the date
Count(ID): gives me the number of ID
And what I want is to count only the ID when [date import] is max. So I tried different things:
Count(if( [date import]= max([date import]), ID))
Count({<max([date import])>} ID)
... It didn't work...
I'm sure it's possible ! thanks for your help
Best regards
Is Activité one of your dimension? It seems that it will only work if it is one of the dimension: https://help.qlik.com/sense/2.0/en-US/online/#../Subsystems/Hub/Content/ChartFunctions/BasicAggregat...
Yes "Activité" is the first dimension and the values can be (ST59, ST50, ST40, etc...)
I added some bracket and the expression is now "OK" but in my charts values are all =0
Can you add another expression to your chart
=Max(TOTAL <Activité> [date import]), ID))
and see what output it shows you?
I tried but I didn't manage to get any good result. I also added the .qvf file to my initial message. So it's maybe easier to do some trial...
Awesome, checking it now
See if this expression helps:
Count(If(Aggr([date import] = Max(TOTAL <[Activité]> [date import]), [Activité], MSN, [date import]), ID))
Perfect. I would never have found this on my own. Never had to do something that twisty. Thanks for your help and your time Sunny. I hope I can return the favour one day, but a lot of training needed before!
Have a nice day!
Hahaha it took me a while before I figured it myself, but I know people in the community who would have given you the solution in a blink of an eye. I am learning, you are learning, we all learning. So one day, I would be glad to receive your help.
Best,
Sunny