Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am trying to find the week in 2016 in which the total traffic volume per country was the highest one.
To find the max traffic volume I am using:
MAX(aggr(sum({<[YEAR]={'2016'}>}[TRAFFIC]),WEEK,COUNTRY))
and in order to find the week I am using:
FirstSortedValue(WEEK, -Aggr(sum({<[YEAR]={'2016'}>}[TRAFFIC]),WEEK))
The problem is that this second function works only when a specific country is filtered, but if nothing is filtered it gives me back "-".
I would like to have all the values, without having to filter them...
Any idea?
Thanks in advance
Actually, I can't share the application for two reasons:
1) privacy
2) the company is now discussing with the vendors to buy the client licenses and I still don't have it...
What I can't understand is why the formula I was using gave me the correct result only when filtering... Do you think it was a my coding mistake?
We are not sure how your data model and script looks like hence asked for a sample. YOu might want to look into this to scramble your data to protect data privacy to upload.
Preparing examples for Upload - Reduction and Data Scrambling
Yes, we also can understand your problem over there
1) That's why we are creating dummy data with same Fields
2) Don't require license because if you need DOC for this we can help to create Doc for you. Or atleast we can understand what you did and what we suppose to do.
Try for me using $.
FirstSortedValue(WEEK, -Aggr(sum({$<[YEAR]={'2016'}>}[TRAFFIC]),WEEK))
Learning from stalwar1
My bad, can you try this (I misplaced Country in my previous response):
FirstSortedValue(WEEK, -Aggr(sum({<[YEAR]={'2016'}>} [TRAFFIC]), Country, WEEK))
Many, many, many thanks!
It works perfectly
And thanks to all of you for having helped me
Is it still not resolved? I thought it was?
Yes it is
The moderator has approved this content with some delay...
As you can see I posted that reply right after your one ..
thanks again!!