Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a data model that has data for multiple years. The year is stored in a field called custOutcomeYear. I would like to create a chart that only sum current revenue data for the current year. The current year is in a varialbe called vCurrentYear. Can this be dine using set analysys? If so how??
Thanks in advance.
sum({<custOutcomeYear={"$(=vCurrentYear)"}>} current_revenue)
Regards,
Kiran Rokkam.
sum({<custOutcomeYear={"$(=vCurrentYear)"}>} current_revenue)
Regards,
Kiran Rokkam.
same purpose, (slightly) less code, less prone for failures (no (,{ and <>)
sum(if(custOutcomeYear=$CurrentYear,current_revenue))
or
sum(if(custOutcomeYear=$CurrentYear AND day=$today ,current_revenue))
Hi Alexander / all,
wouldn't the set analysis be a more efficient way of doing this (ie system performance), as it removes the line by line evaluation of the "if" statement?
Please advise,
Kind regards,
Rich
Hi
Sum(If()) expressions should be used with caution - they perform very poorly (or not at all) on large data sets. Set analysis expressions perform far better.
Regards
Jonathan
So if I wanted to display only data for the current year, thein I would have to use something like that for each field I wat to display?
Use only for year field, if u need to display disregarding the selection of month, day, quarter, week then exclude that fields
sum({<custOutcomeYear={$(=vCurrentYear)}, Month=, Week=, Quarter=, Day=>} current_revenue)
set analysis is indeed far more performance efficient.
i wanted to provide an example, as joestang was new to set analysis.
so, if your set analysis seems not to be working, try the more simple example to test your parameters.
if they dont work with the "sum(IF)" example, the problem is not in set analysis, but in the parameter.
.