Hi @AndriyShepel,
You could use a calculated field for each bar metric, something like: sumOver(ifelse({data_type} = 'actuals', {amount}, NULL), [], PRE_AGG)
I’ve tried it but it calculates the same value for all dates (i guess, due to [ ] operator, which calculates the total for the entire data set)
I modified the formula to the following value:
What you say is correct. The content of the brackets indicate the aggregation level. In QuickSight we know this concept as a level-aware calculation - aggregate (LAC-A). If there is nothing between the bracket, it will take the total for the whole table. One recommendation I can give is to put your calculated field with the other colums you showed in a table, this can help you understand the different effects of LAC-A and LAC-W. More information on this topic can be found here: https://docs.aws.amazon.com/quicksight/latest/user/level-aware-calculations.html