Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In my Qliksense app, I have two tables that is showing the cost/volume but it is aggregating the result differently. As you can see the total is accurate in both tables, but in one table the result is presented as a % of the total and in the other it is presenting the total for the region (as I want it). The difference between the table is the period selections as they are connected to different selections. The underlying data is the same though. I have a feeling this is an easy fix. Anyone that can help?
Issue is solve:
Instead of using the variable v_DTS_FOR_INTERVAL1, I just copied the formula inside and used it directly and it worked. Is this a bug within Qlik?
Hi @FBSK,
can you provide the formula you used for calculating the measures ? Or are they identical ?
Hi @Mark_Leifeld,
Sure, sorry it's quite long with variables included. Please tell me if you want me to provide you the variables as well.
Measure giving the result in the wrong "format":
=fabs((sum({$<Year,Period,[Statement Type 2]={'IS'},[Scenario]= {'$(v_SCENARIOCOMP1)'},Period={">=$(=v_CHOOSE_STARTCOMP1)<=$(=v_CHOOSE_ENDCOMP1)"}>} Value)))
/
v_DTS_FOR_INTERVAL1
The correct format:
if('$(v_ISO_YTD1)'='ISO',
Sum({<[Statement Type 2]={'IS'},[Scenario]= {'$(v_SCENARIO1)'},Period={'$(v_CHOOSE_PERIOD1)'}>} Value),
if('$(v_ISO_YTD1)'='YTD',
Sum({<[Statement Type 2]={'IS'},[Scenario]= {'$(v_SCENARIO1)'},Period ={">=$(=(v_FIRST_PERIOD1))<=$(=(v_CHOOSE_PERIOD1))"}>} Value),
if('$(v_ISO_YTD1)'='$(v_QUARTER1)',
Sum({<[Statement Type 2]={'IS'},[Scenario]= {'$(v_SCENARIO1)'},Period={"<=$(v_CHOOSE_PERIOD1)"},Quarter={'$(v_LATEST_QUARTER1)'},Year ={'$(v_CURRENT_YEAR1)'}>}Value))))
/
if('$(v_ISO_YTD1)'='ISO',
Sum({<[Lvl 1],[Lvl 2],[Lvl 3],[Lvl 4],[Lvl 5],[Lvl 6],[Lvl 7],[Lvl 8],[Lvl 9],[Cost_Surcharges],[Cost or Surcharge],[Allocations],[Cost Surch. Groups],[Cost Surch. Next Lvl],[Cost Surch. Lvl 1],[Flash Groups],[Flash Next Lvl],[Lvl 2 Vol]={'FS Deliveries to std Recalc'},[Scenario]= {'$(v_SCENARIO1)'},Period={'$(v_CHOOSE_PERIOD1)'}>} Value),
if('$(v_ISO_YTD1)'='YTD',
Sum({<[Lvl 1],[Lvl 2],[Lvl 3],[Lvl 4],[Lvl 5],[Lvl 6],[Lvl 7],[Lvl 8],[Lvl 9],[Cost_Surcharges],[Cost or Surcharge],[Allocations],[Cost Surch. Groups],[Cost Surch. Next Lvl],[Cost Surch. Lvl 1],[Flash Groups],[Flash Next Lvl],[Lvl 2 Vol]={'FS Deliveries to std Recalc'},[Scenario]= {'$(v_SCENARIO1)'},Period ={">=$(=(v_FIRST_PERIOD1))<=$(=(v_CHOOSE_PERIOD1))"}>} Value),
if('$(v_ISO_YTD1)'='$(v_QUARTER1)',
Sum({<[Lvl 1],[Lvl 2],[Lvl 3],[Lvl 4],[Lvl 5],[Lvl 6],[Lvl 7],[Lvl 8],[Lvl 9],[Cost_Surcharges],[Cost or Surcharge],[Allocations],[Cost Surch. Groups],[Cost Surch. Next Lvl],[Cost Surch. Lvl 1],[Flash Groups],[Flash Next Lvl],[Lvl 2 Vol]={'FS Deliveries to std Recalc'},[Scenario]= {'$(v_SCENARIO1)'},Period={"<=$(v_CHOOSE_PERIOD1)"},Quarter={'$(v_LATEST_QUARTER1)'},Year ={'$(v_CURRENT_YEAR1)'}>}Value))))
Issue is solve:
Instead of using the variable v_DTS_FOR_INTERVAL1, I just copied the formula inside and used it directly and it worked. Is this a bug within Qlik?