Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys,
I have a problem, i want to sum just one value in a table.
I use this expression:
=sum(if(Aggr(Rank(sum({$<FABRICANTE-={'Name of field to exclude'}, %Measure_N={'€sP','€cP'}, %Time.Type={'CP'}, Marca=>}Valor))=1,Valor, CATEGORIA),Valor))
im try to saying that i want the value from the number 1 in rank, whitout the name of a specific manufacturer, but e want to sum the value of the manufacturer that is in the first place.
I want to sum the value in yellow, but the expression just gives me the full amount that is 1941274, that is the sum of the 3 lines.
any one can help?
tnks!
PCordeiro
I think you should be able to do this, you probably just need to ignore selections in CATEGORY / FABRICANTE in your aggregation:
=Max( TOTAL
{$<CATEGORIA=, FABRICANTE-={'Name of field to exclude'}, %Measure_N={'€sP','€cP'}, %Time.Type={'CP'}, Marca=>}
Aggr(
sum({$<CATEGORIA=, FABRICANTE-={'Name of field to exclude'}, %Measure_N={'€sP','€cP'}, %Time.Type={'CP'}, Marca=>} Valor)
,CATEGORIA, FABRICANTE // add here all dimension fields of your chart
)
)
Try this:
=Sum(If(Aggr(Rank(sum({$<FABRICANTE-={'Name of field to exclude'}, %Measure_N={'€sP','€cP'}, %Time.Type={'CP'}, Marca=>}Valor), 1, 1) < 2, CATEGORIA), Valor))
its not working! i have tryed that one as well!
my problem is that i have done this to show me the 1st seller with this expression:
=if( CATEGORIA = 'Name of cagtegory to exclude if', '- '
,Aggr(if(Rank( Sum( {<FABRICANTE-={'Name of field to exclude'}>} Valor))=1, FABRICANTE),CATEGORIA,FABRICANTE))
but now i want the value of that 1st, witch is 1562654.. but with no success!
How about this:
=Max(If(Aggr(Rank(sum({$<FABRICANTE-={'Name of field to exclude'}, %Measure_N={'€sP','€cP'}, %Time.Type={'CP'}, Marca=>}Valor), 1, 1) < 2, CATEGORIA), Valor))
Or maybe
=Max( {$<FABRICANTE-={'Name of field to exclude'}, %Measure_N={'€sP','€cP'}, %Time.Type={'CP'}, Marca=>}
Aggr(
sum({$<FABRICANTE-={'Name of field to exclude'}, %Measure_N={'€sP','€cP'}, %Time.Type={'CP'}, Marca=>} Valor)
,CATEGORIA, FABRICANTE // add here all dimension fields of your chart
)
)
And please specify in which context you are trying to get your result.
If it's in the chart itself, you might need to add a TOTAL qualifier:
=Max( TOTAL
{$<FABRICANTE-={'Name of field to exclude'}, %Measure_N={'€sP','€cP'}, %Time.Type={'CP'}, Marca=>}
Aggr(
sum({$<FABRICANTE-={'Name of field to exclude'}, %Measure_N={'€sP','€cP'}, %Time.Type={'CP'}, Marca=>} Valor)
,CATEGORIA, FABRICANTE // add here all dimension fields of your chart
)
)
Its worked, but i have other values that if i choose the Category, the value is the MAX, but i want the value of the 1st manufacturer in rank, its not going to work with MAX.
my problem is that i have done this to show me the 1st seller with this expression:
=if( CATEGORIA = 'Name of cagtegory to exclude if', '- '
,Aggr(if(Rank( Sum( {<FABRICANTE-={'Name of field to exclude'}>} Valor))=1, FABRICANTE),CATEGORIA,FABRICANTE))
but now i want the value of that 1st RANK, witch is 1562654.. but with no success!
Not sure if I can follow your explanations, could you post a small sample QVW or at least some more screenshots that clearly show what you are trying to exclude and include in your aggregation?
i have this table, and i want the value of the 1st rank, if i choose other manufacturer or category, the show me the max value. but i want the value of the first ones. in this case is 1562654.
her is another example
In this case is the 68981.
i just want the first value of the number one in the rank, with MAX i cant get it.
tnks
regards
PCordeiro