Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
In a table I have a list of movies with a unique "%Key_object_id" that also have a "price". These movies are spread across multiple "providers" and multiple providers will have certain movies, sometimes with the same price, sometimes not.
I have created a measure which shows the highest an lowest price:
aggr(max(price),%Key_object_id)
aggr(min(price),%Key_object_id)
and I am trying to find a way to match this value with the "provider" dimensional value so I can have two columns where I get the name of the provider with the highest and lowest price. If there a a couple that share the highest or lowest price I would like to have it concatenated and separated by a comma.
Could anyone help me in the right direction?
Cheers Henning
If i understand correctly from your description, May be use this?
FirstSortedValue([name of the provider], aggr(max(price),%Key_object_id))) & ' - ' & aggr(max(price),%Key_object_id)
FirstSortedValue([name of the provider], aggr(min(price),%Key_object_id))) & ' - ' & aggr(min(price),%Key_object_id)
May be try this
Concat(Aggr(
If(Max(TOTAL price) = price, providers)
, %Key_object_id, providers), ', ')
and
Concat(Aggr(
If(Min(TOTAL price) = price, providers)
, %Key_object_id, providers), ', ')
thanks this works perfect except for one thing. The values (the providers have the lowest resp. highest prices) only show up when I click on a specific title. If I do not click, they look like null values? Any ideas?
What exactly is a title here? I am not sure I understand?
Hi again!
When I look at all titles it looks like a null value , but when I press on one of the titles I get the correct answer (see below)
May be this.. add Title to Aggr() function's dimension
Concat(Aggr(
If(Max(TOTAL price) = price, providers)
, %Key_object_id, providers, Title), ', ')
and
Concat(Aggr(
If(Min(TOTAL price) = price, providers)
, %Key_object_id, providers, Title), ', ')
hi again, still no luck but will continue trying!
Cheers Henning
I am a little confused... would you be able to share a sample where we can see the issue?