DECLARE(
curr_month, DATETOTEXT(NOW, "MMMM"),
next_month , DATETOTEXT(DATEADD(TODAY,1,"month") , "MMMM"),
val, SUBSET_SUM([Value], SUBSET2("Sub-Dept", "Month", [Sub-Dept], curr_month )),
IF([Month]= curr_month, (-1 * ( 0.4 * val )),
[Month]= next_month, (-1 * ( 0.6 * val )),
0)
)
DECLARE(
curr_month, DATETOTEXT(NOW, "MMMM"),
next_month , DATETOTEXT(DATEADD(TODAY,1,"month") , "MMMM"),
DECLARE(
val, SUBSET_SUM([Value], SUBSET2("Sub-Dept", "Month", [Sub-Dept], curr_month )),
IF([Month]= curr_month, (-1 * ( 0.4 * val )),
[Month]= next_month, (-1 * ( 0.6 * val )),
0)
)
)
It looks like you're new here. If you want to get involved, click one of these buttons!