6 Replies Latest reply: Oct 3, 2018 4:23 AM by Erik Wetterberg RSS

    Qlik Sense Mashup - using applyPatches to change measure

    Richard Bartley

      Hi everyone,


      I am having an issue trying to use the applyPatches method to change the measure in a pivot table.  I have been able to change the sort order and various other properties, but I assume there is a problem with the syntax of the JSON I am using:


      var patches = [{
      'qPath': '/layout/qHyperCubeDef/qMeasures/0',
      'qOp': 'replace',
      'qValue': '{\'qDef\':\'Sum(Value)\'}'
      vis.applyPatches( patches, true );



      The error I am getting is:


      applyPatches Change Measure.PNG



      I have also tried without "layout" in the path, but I still get the error message.  Depending on the qValue entry, I can also get a slightly different error message:



      applyPatches Change Measure 2.PNG




      Any help would be gratefully received.