Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a straight table that usezs above () function and gives me right values.
But when the same formula is used in a line chart it gives wrong results .
The strangest part is when I select a value in year dimension it gives me right values, but I want to implement the logic in expression itself.
!
You are using a line chart with dimension Month and Year, so for multiple years, the underlying table looks like
Jan, 2014
Jan, 2015
Feb, 2014,
Feb, 2015
While you need it to be
2014, Jan
2014, Feb
...
2015, Jan
2015, Feb
You can change the order of dimensions by using advanced aggregation aggr() function in your expression, but this would need Month to have a chronologic load order (which I think you don't have right now).
=aggr(
YourExpression
, YearField, MonthField)
See if this is resolved? PFA
Best,
Sunny
You are using a line chart with dimension Month and Year, so for multiple years, the underlying table looks like
Jan, 2014
Jan, 2015
Feb, 2014,
Feb, 2015
While you need it to be
2014, Jan
2014, Feb
...
2015, Jan
2015, Feb
You can change the order of dimensions by using advanced aggregation aggr() function in your expression, but this would need Month to have a chronologic load order (which I think you don't have right now).
=aggr(
YourExpression
, YearField, MonthField)
Thank you ! again
What exactly did you do, because the formula hasn't changed.I'm guessing yo9u must have changed some setting
Thank you ! Swuel .
formula did change from:
(Sum ({<REPORT_YEAR={2015}>}FLIGHT_HRS)
/ COUNT({<REPORT_YEAR={2015}>} AC_SERIAL)
* COUNT({<REPORT_YEAR={2015}>} AC_SERIAL)
)
-
above( total(Sum ( FLIGHT_HRS)
/ COUNT( AC_SERIAL) )
* COUNT(AC_SERIAL)
)
to:
(Sum ({<REPORT_YEAR={2015}>}FLIGHT_HRS)
/ COUNT({<REPORT_YEAR={2015}>} AC_SERIAL)
* COUNT({<REPORT_YEAR={2015}>} AC_SERIAL)
)
-
above( total(Sum ({<REPORT_YEAR={2015}>} FLIGHT_HRS)
/ COUNT({<REPORT_YEAR={2015}>} AC_SERIAL) )
* COUNT({<REPORT_YEAR={2015}>}AC_SERIAL)
)
Then you can also remove the dimension REPORT_YEAR from the chart ...
Sunny,
but I lose the first month ( in this case Jan ..because of above function )
I want to retain Jan also ..that's why I'm not using {<REPORT_YEAR={2015}>} in the below expression
above( total(Sum ( FLIGHT_HRS)
/ COUNT( AC_SERIAL) )
* COUNT(AC_SERIAL)
)
Manual about above/below - Missing Manual - Above() and Below()