{ "type" : "dataRule", "metadata" : [{"kind":3,"id":14,"active":true,"modifiedDate":{"value":1765216737963},"modifiedBy":"Keziah Patha","name":"Calculate On-Sale Discounts","systemCategory":0,"components":[{"kind":1,"componentId":1,"displayMode":2,"name":"Deflator Percent - Writeback","systemCategory":0,"modelId":11,"measureGroupName":"CoreMG","partitionName":"Writeback","targetColumns":[{"kind":1,"id":"e07883166828bb27f469fa780b140e07","reference":"Account.Account","dBType":2,"name":"AccountId","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":1,"tableColumn":"AccountId","member":{},"sourceType":0},{"kind":1,"id":"e7784215ae994c4cb8f12b7ec050bb9f","order":1,"reference":"Scenario.Scenario","dBType":2,"name":"ScenarioId","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":1,"tableColumn":"ScenarioId","member":{},"sourceType":0},{"kind":1,"id":"d65e2bd903aeb33e74a074c341aacd3d","order":2,"reference":"Time.Months","dBType":3,"name":"TimeId","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":1,"tableColumn":"TimeId","member":{},"sourceType":0},{"kind":1,"id":"ea051bb41c38024b2ed5c1ed3da73cd9","order":3,"reference":"Entity.Entity","dBType":2,"name":"EntityId","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":1,"tableColumn":"EntityId","member":{},"sourceType":0},{"kind":1,"id":"2c27569a42393512fed61d74fc145a0c","order":4,"reference":"Product.Brands","dBType":2,"name":"ProductId","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":1,"tableColumn":"ProductId","member":{},"sourceType":0},{"kind":1,"id":"a0603fcd427e6ccad26349b33b636ddb","order":5,"dBType":5,"name":"Value","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":1,"tableColumn":"Value","member":{},"sourceType":0}],"inheritedColumnIdMappings":[["ProductId","9617a01d960f0218f3c5dfdfd5b8a0e0"],["Comment","ef2763070557f4d887aaf9520699ad57"],["TimeId","4417d5413a0965a32e2520002125bfc1"],["AccountId","d7643e3730caec99ee8a436761c3058b"],["Value","32082228d0ac3a6020430085eed18ecd"],["ScenarioId","c3bcbc5936ed05ff022b67d25e966d9f"],["EntityId","8b1a9afafa9b83e0801665f7a249d652"]]},{"kind":1,"componentId":2,"displayMode":2,"order":1,"name":"Reporting - Calculated","systemCategory":0,"filters":[{"columnType":1,"tableColumn":"AccountId","inheritedColumnId":"00000000000000000000000000000000","expressionType":1,"members":[{"entries":[["MemberLabel",{"type":1,"stringValue":"Gross Sales Before Returns","doubleValue":0}],["MemberName",{"type":1,"stringValue":"Gross Sales Before Returns","doubleValue":0}],["UniqueName",{"type":1,"stringValue":"[Account].[Account].&[4]","doubleValue":0}],["Caption",{"type":1,"stringValue":"Gross Sales Before Returns","doubleValue":0}],["IsLeaf",{"type":2,"booleanValue":true,"doubleValue":0}],["MemberId",{"type":3,"int32Value":4,"doubleValue":0}]]}],"systemCategory":0},{"columnType":1,"tableColumn":"ScenarioId","inheritedColumnId":"00000000000000000000000000000000","expressionType":1,"systemCategory":0},{"columnType":1,"tableColumn":"TimeId","inheritedColumnId":"00000000000000000000000000000000","expressionType":1,"systemCategory":0},{"columnType":1,"tableColumn":"EntityId","inheritedColumnId":"00000000000000000000000000000000","expressionType":1,"systemCategory":0},{"columnType":1,"tableColumn":"ProductId","inheritedColumnId":"00000000000000000000000000000000","expressionType":1,"systemCategory":0},{"columnType":1,"tableColumn":"Value","inheritedColumnId":"00000000000000000000000000000000","expressionType":2,"systemCategory":0}],"modelId":5,"measureGroupName":"CoreMG","partitionName":"Calculated","targetColumns":[{"kind":1,"id":"2faa4ad0e76c9ebe803a23291892a14d","reference":"Account.Account","dBType":2,"name":"AccountId","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":1,"tableColumn":"AccountId","member":{},"sourceType":0},{"kind":1,"id":"98350104504695048bbf7fd496fe7224","order":1,"reference":"Scenario.Scenario","dBType":2,"name":"ScenarioId","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":1,"tableColumn":"ScenarioId","member":{},"sourceType":0},{"kind":1,"id":"b4d29f164a3172553148478f3419f6a1","order":2,"reference":"Time.Months","dBType":3,"name":"TimeId","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":1,"tableColumn":"TimeId","member":{},"sourceType":0},{"kind":1,"id":"5657d23a5ec5fe8865698148e8efdba1","order":3,"reference":"Entity.Entity","dBType":2,"name":"EntityId","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":1,"tableColumn":"EntityId","member":{},"sourceType":0},{"kind":1,"id":"8287c97518cbbedd39a9d8fbc3248f81","order":4,"reference":"Product.Product","dBType":2,"name":"ProductId","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":1,"tableColumn":"ProductId","member":{},"sourceType":0},{"kind":1,"id":"951ae82022765e9bd3b7def9e88113ed","order":5,"dBType":5,"name":"Value","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":1,"tableColumn":"Value","member":{},"sourceType":0}],"inheritedColumnIdMappings":[["ProductId","5fbbb1f1c8d6ae9d44df5f7e56954511"],["TimeId","97775845dc67d7539e98c2226819a21f"],["AccountId","e00a9c6c07bf42861df67386f60200b9"],["Value","ce2ee5faff1c26d5b39aac9ec29de18c"],["ScenarioId","f0aa4c8dcdd6bdfaee52c711872b3a70"],["EntityId","fbb072b90a67e09e8ee4b7344dd837fb"]]},{"kind":0,"componentId":3,"displayMode":2,"order":2,"name":"Product","systemCategory":0,"targetColumns":[{"kind":1,"id":"1a868e291d374edb3218de5f63940d4f","reference":"Product.Product","dBType":2,"name":"ProductId","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":1,"tableColumn":"MemberId","member":{},"sourceType":0},{"kind":1,"id":"cdfc65c0c8490c6888f558235823758b","order":1,"reference":"Product.Product.Brand","dBType":130,"name":"Brand","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":1,"tableColumn":"Brand","member":{},"sourceType":0}],"inheritedColumnIdMappings":[["Input","c2e2a047cedec699844b14e1b87a0d23"],["MemberLabel","681551fc33ff082ed560cf457cc21fd1"],["MemberName","c600a3c629ff60fcf6d0d510764904c4"],["MemberId","d3a2b8e1df227dfc505f0e4deb9f825e"],["Annotate","594c06ae2eb98b6440043be728890a9a"],["Brand","81d23dd8a0bc9854f4288e09c9a3860a"]],"dimension":"Product","hierarchy":"Product"},{"kind":6,"componentId":4,"displayMode":2,"order":3,"name":"Join Revenue with Brand","systemCategory":0,"joins":[{"joinType":1,"dataSourceId":3,"aliasId":1,"conditions":[{"mode":0,"rightAliasId":1,"leftColumnId":"8287c97518cbbedd39a9d8fbc3248f81","rightColumnId":"1a868e291d374edb3218de5f63940d4f","systemCategory":0}],"systemCategory":0}],"targetColumns":[{"kind":1,"id":"7fb6fda5ffc10b709e06d2ee08b29e4a","reference":"Account.Account","dBType":2,"name":"AccountId","systemCategory":0,"inheritedColumnId":"2faa4ad0e76c9ebe803a23291892a14d","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"a2073fb775f09f4e6a3e926ceb1727da","order":1,"reference":"Scenario.Scenario","dBType":2,"name":"ScenarioId","systemCategory":0,"inheritedColumnId":"98350104504695048bbf7fd496fe7224","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"c0ed24cd9acad64955d4078d5c426540","order":2,"reference":"Time.Months","dBType":3,"name":"TimeId","systemCategory":0,"inheritedColumnId":"b4d29f164a3172553148478f3419f6a1","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"a8c4f95c0c34bc05cb07565c97d7a036","order":3,"reference":"Entity.Entity","dBType":2,"name":"EntityId","systemCategory":0,"inheritedColumnId":"5657d23a5ec5fe8865698148e8efdba1","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"f5f92c91b49698064fefaf85121d9396","order":4,"reference":"Product.Product","dBType":2,"name":"ProductId","systemCategory":0,"inheritedColumnId":"8287c97518cbbedd39a9d8fbc3248f81","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"5d15a3ba54eeb92eb804ce21ecc4bdc9","order":5,"dBType":5,"name":"Value","systemCategory":0,"inheritedColumnId":"951ae82022765e9bd3b7def9e88113ed","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"32112d781af9f50f5e9d2fbbdf427570","aliasId":1,"order":6,"reference":"Product.Product.Brand","dBType":130,"name":"Brand","systemCategory":0,"inheritedColumnId":"cdfc65c0c8490c6888f558235823758b","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0}],"rootDataSourceId":2},{"kind":6,"componentId":5,"displayMode":2,"order":4,"name":"Join Deflator % with Brand","systemCategory":0,"joins":[{"joinType":1,"dataSourceId":3,"aliasId":1,"conditions":[{"mode":0,"rightAliasId":1,"leftColumnId":"2c27569a42393512fed61d74fc145a0c","rightColumnId":"1a868e291d374edb3218de5f63940d4f","systemCategory":0}],"systemCategory":0}],"targetColumns":[{"kind":1,"id":"8d869a41d55acc1920b142741767d9ac","reference":"Account.Account","dBType":2,"name":"AccountId","systemCategory":0,"inheritedColumnId":"e07883166828bb27f469fa780b140e07","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"fdaae062164b93d8bd23750db986a2e5","order":1,"reference":"Scenario.Scenario","dBType":2,"name":"ScenarioId","systemCategory":0,"inheritedColumnId":"e7784215ae994c4cb8f12b7ec050bb9f","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"923bbd638346c2b2ff2fbd4eab8da2f1","order":2,"reference":"Time.Months","dBType":3,"name":"TimeId","systemCategory":0,"inheritedColumnId":"d65e2bd903aeb33e74a074c341aacd3d","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"8c275b3f014f711bc6d1f4dc84907a07","order":3,"reference":"Entity.Entity","dBType":2,"name":"EntityId","systemCategory":0,"inheritedColumnId":"ea051bb41c38024b2ed5c1ed3da73cd9","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"76eb33bfee3d91f711cb5ad55e983148","order":4,"reference":"Product.Brands","dBType":2,"name":"ProductId","systemCategory":0,"inheritedColumnId":"2c27569a42393512fed61d74fc145a0c","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"14679e5bdc8cd040227197c0e7ced596","order":5,"dBType":5,"name":"Value","systemCategory":0,"inheritedColumnId":"a0603fcd427e6ccad26349b33b636ddb","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"084bf0e34c4ed03ff46413540ce8cc06","aliasId":1,"order":6,"reference":"Product.Product.Brand","dBType":130,"name":"Brand","systemCategory":0,"inheritedColumnId":"cdfc65c0c8490c6888f558235823758b","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0}],"rootDataSourceId":1},{"kind":6,"componentId":6,"displayMode":2,"order":5,"name":"Join Deflator % with Revenue","systemCategory":0,"joins":[{"joinType":1,"dataSourceId":4,"aliasId":1,"conditions":[{"mode":0,"rightAliasId":1,"leftColumnId":"fdaae062164b93d8bd23750db986a2e5","rightColumnId":"a2073fb775f09f4e6a3e926ceb1727da","systemCategory":0},{"mode":0,"rightAliasId":1,"leftColumnId":"923bbd638346c2b2ff2fbd4eab8da2f1","rightColumnId":"c0ed24cd9acad64955d4078d5c426540","order":1,"systemCategory":0},{"mode":0,"rightAliasId":1,"leftColumnId":"8c275b3f014f711bc6d1f4dc84907a07","rightColumnId":"a8c4f95c0c34bc05cb07565c97d7a036","order":2,"systemCategory":0},{"mode":0,"rightAliasId":1,"leftColumnId":"084bf0e34c4ed03ff46413540ce8cc06","rightColumnId":"32112d781af9f50f5e9d2fbbdf427570","order":3,"systemCategory":0}],"systemCategory":0}],"targetColumns":[{"kind":1,"id":"ad002bbc1233f63deb91d7aff90d0bcb","aliasId":-1,"reference":"Account.Account","dBType":2,"name":"AccountId","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":5,"expression":"CASE \nWHEN ${A.8d869a41-d55a-cc19-20b1-42741767d9ac} = 24 THEN 5\nWHEN ${A.8d869a41-d55a-cc19-20b1-42741767d9ac} = 25 THEN 7\nWHEN ${A.8d869a41-d55a-cc19-20b1-42741767d9ac} = 26 THEN 8\nWHEN ${A.8d869a41-d55a-cc19-20b1-42741767d9ac} = 27 THEN 9\nWHEN ${A.8d869a41-d55a-cc19-20b1-42741767d9ac} = 28 THEN 17\nWHEN ${A.8d869a41-d55a-cc19-20b1-42741767d9ac} = 29 THEN 18\nWHEN ${A.8d869a41-d55a-cc19-20b1-42741767d9ac} = 30 THEN 19\nWHEN ${A.8d869a41-d55a-cc19-20b1-42741767d9ac} = 31 THEN 20\nELSE ${A.8d869a41-d55a-cc19-20b1-42741767d9ac} \nEND","member":{},"sourceType":0},{"kind":1,"id":"0f6392606a81e318855d3282c66ff057","order":1,"reference":"Scenario.Scenario","dBType":2,"name":"ScenarioId","systemCategory":0,"inheritedColumnId":"fdaae062164b93d8bd23750db986a2e5","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"1e7f73332d061a9deb8d3a7c6d3927d7","order":2,"reference":"Time.Months","dBType":3,"name":"TimeId","systemCategory":0,"inheritedColumnId":"923bbd638346c2b2ff2fbd4eab8da2f1","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"926ccc083d42760eed73741fd11b4475","order":4,"reference":"Entity.Entity","dBType":2,"name":"EntityId","systemCategory":0,"inheritedColumnId":"8c275b3f014f711bc6d1f4dc84907a07","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"8ff9e5272fd6cbc4494d7727a21eeacd","aliasId":1,"order":3,"reference":"Product.Product","dBType":2,"name":"ProductId","systemCategory":0,"inheritedColumnId":"f5f92c91b49698064fefaf85121d9396","unionColumnId":"00000000000000000000000000000000","aggregationFunction":0,"expressionType":2,"member":{},"sourceType":0},{"kind":1,"id":"697dca87d511e73c5269580b32516182","aliasId":-1,"order":7,"dBType":5,"name":"Calculated","systemCategory":0,"inheritedColumnId":"00000000000000000000000000000000","unionColumnId":"00000000000000000000000000000000","isEnforceType":true,"aggregationFunction":1,"expressionType":3,"expression":"${A.14679e5b-dc8c-d040-2271-97c0e7ced596}*${B.5d15a3ba-54ee-b92e-b804-ce21ecc4bdc9}","member":{},"sourceType":0}],"rootDataSourceId":5},{"kind":2,"componentId":7,"displayMode":2,"order":6,"name":"Reporting","systemCategory":0,"dataSourceId":6,"modelId":5,"measureGroupName":"CoreMG","removeZeros":true,"columnMappings":[["ProductId","ProductId"],["TimeId","TimeId"],["AccountId","AccountId"],["Value","Calculated"],["ScenarioId","ScenarioId"],["EntityId","EntityId"]]}],"postExecutionClearType":0,"postExecutionApplyType":0,"workflowExecution":0}]}