Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Guys,
I need to get the value of sales of the maximum month that is not null, how to do that
i tried this but didn't work
Sum(
FirstSortedValue(
{<sales-={"0"}>} sales/ 1000000,
date
)
)
Hi @janeee__ ,
Can you please try this?
Sum({<date = {'$(=Max({<sales = {">0"}>} date))'}>} sales)
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
thanks @marksouzacosta for your response it works for some records and no for others
for exemple it displays 0 in the table for some participation that have value but whene i clik on participation filter, it displays the right value, i don't know why
it give me result only of max date =01/08/2024
if participation has value on dec 2021 it gives me 0
here's my expression
aggr(Sum({<debut_mois = {'$(=Max({<net_c-={"0"}>} debut_mois))'}>} DISTINCT net_c/1000000),participation)
Hi @janeee__,
This is because the Aggregation you are using.
Max({<net_c-={"0"}>} debut_mois) will return the Max debut_mois disregarding the aggregation you are using.
If you need to consider participation or other dimensions, you can add those as Dimensions in your chart and remove the Aggr statement. What is the chart you are trying to do? Can you please send a screen shot?
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
@janeee__ If each Participation has different max date, try below
= FirstSortedValue( distinct {<net_c={">0"}>} aggr(sum(net_c),participation,debut_mois), -debut_mois)