Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I'm trying to calculate the percentage of two selections (in this case, years, months, weeks).
The expression is: (year with the less value divided by year with the high value)-1
This years are listed on a list box, how can i do it? 😕
HI,
Try like this
=(RangeMin(Sum({$ <YearFieldName={'$(=Min(YearFieldName))'}>} MeasureName),
Sum({$ <YearFieldName={'$(=Max(YearFieldName))'}>} MeasureName))/
RangeMax(Sum({$ <YearFieldName={'$(=Min(YearFieldName))'}>} MeasureName),
Sum({$ <YearFieldName={'$(=Max(YearFieldName))'}>} MeasureName))) - 1
Hope this helps you.
Regards,
Jagan.
maybe
sum({$ <year={'$(=min(year))'}>} somefield)
/
sum({$ <year={'$(=max(year))'}>} somefield)
-1
Maybe like
=FirstSortedValue(DISTINCT Year, Year) / FirstSortedValue(DISTINCT Year, -Year) -1
edit:
If you've selected more than two values or all values possible, this should consider highest two:
=FirstSortedValue(DISTINCT Year, -Year,2) / FirstSortedValue(DISTINCT Year, -Year) -1
and this lowest two:
=FirstSortedValue(DISTINCT Year, Year) / FirstSortedValue(DISTINCT Year, Year,2) -1
Try this expression
=num(sum({<Order_Year={'$(=Min(Order_Year))'}>}TotalDue)/sum({<Order_Year={'$(=Max(Order_Year))'}>}TotalDue),'#,##0%')
HI,
Try like this
=(RangeMin(Sum({$ <YearFieldName={'$(=Min(YearFieldName))'}>} MeasureName),
Sum({$ <YearFieldName={'$(=Max(YearFieldName))'}>} MeasureName))/
RangeMax(Sum({$ <YearFieldName={'$(=Min(YearFieldName))'}>} MeasureName),
Sum({$ <YearFieldName={'$(=Max(YearFieldName))'}>} MeasureName))) - 1
Hope this helps you.
Regards,
Jagan.
What kind of graph do you recommend me to do this, btw the expression does not recognize the years. But i suppose the problem is me.. hehe
Actually, i set the expression as a title, and it recognize the years just i want, but i don't know what it means TotalDue, is the name of the column that shows the results?
What kind of graph or form do you recommend me?
tyvm, it worked, i was making a big mistake but i saw it and it worked.
Regards
Jorge