Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The attached expression gives me the correct result of monthly gains/losses when a specific area is chosen in a filter. When none or all are selected I get an unknown number.
=(Sum({$<Date_Dash={"$(=FirstWorkDate(Today()-1,1,$(vHolidays)))"}, Status_Dash={'Completed'}>} Processed_Dash - Daily_Target_Dash))
*
(sum({$<Date_Dash={"$(=FirstWorkDate(Today()-1,1,$(vHolidays)))"}, Status_Dash={'Completed'}>}Ave_Cost_Dash))
vHolidays is a variable to account for holidays
I am trying to get the results in a text box.
The correct result when nothing or all are clicked should be "-3,188.95", I am actually getting "-8,240,678"
Try this
=Sum(Aggr(
(Sum({$<Date_Dash={"$(=FirstWorkDate(Today()-1,1,$(vHolidays)))"}, Status_Dash={'Completed'}>} Processed_Dash - Daily_Target_Dash))
*
(sum({$<Date_Dash={"$(=FirstWorkDate(Today()-1,1,$(vHolidays)))"}, Status_Dash={'Completed'}>}Ave_Cost_Dash))
,Date_Dash, Program_Dash, Status_Dash))
Try this
=Sum(Aggr(
(Sum({$<Date_Dash={"$(=FirstWorkDate(Today()-1,1,$(vHolidays)))"}, Status_Dash={'Completed'}>} Processed_Dash - Daily_Target_Dash))
*
(sum({$<Date_Dash={"$(=FirstWorkDate(Today()-1,1,$(vHolidays)))"}, Status_Dash={'Completed'}>}Ave_Cost_Dash))
,Date_Dash, Program_Dash, Status_Dash))
Thanks Sunny! That works
Can you explain to me how the aggr function is working here? I haven't used this one yet.
Aggr() function is used for various reasons, but one of those is to get the sum of rows. So based on your chart, I think you wanted to get the sum of rows. So I used your expressions and wrapped it around with the Sum(Aggr())...
Sum(Aggr(Expression, ChartDimensionsSeparatedByComma))