Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends
I have created a variable and working fine when applied to a expression as follows
=($(vProfit))
but when I modify the expression like below it does not work.Will you please highlight the error in expression please
=sum({$<YEAR = {"$(=Only([YEAR]))"},T_YEAR = {"$(=Only([YEAR]))"}>} $(vProfit))
Can you provide some sample data for this ?
It is difficult to upload the data it is big file. Can you by a look of expression say whether it is coded right
What is the Statement for vProfit variable?
iT IS LIKE THIS
sum( {<NOTE = {'100'}>}[AMOUNT] )*-1
-sum( {<NOTE = {'101','102','103'}>}[AMOUNT] )
-sum( {<NOTE = {'105','107','108'}>}[AMOUNT] )
-sum( {<NOTE = {'130','131','132','133','134','137','138','139','140'}>}[AMOUNT] )
-sum( {<NOTE = {'120','121','123'}>}[AMOUNT] )
-sum( {<GROUP_CODE = {'MA','MB','MC','MD','ME'}>}[AMOUNT] )
+sum( {<NOTE = {'150','151','160','161'}>}[AMOUNT] )*-1
Try the below code:
=sum({$<YEAR = {"$(=Only([YEAR]))"},T_YEAR = {"$(=Only([YEAR]))"}>} (=$(vProfit)))
That is also not working
is it correct to assume that :
vProfit = " Sum( {<NOTE = {'100'}>}[AMOUNT] )*-1 sum( {<NOTE = {'101','102','103'}>}[AMOUNT] )
sum( {<NOTE = {'105','107','108'}>}[AMOUNT] )
-sum( {<NOTE = {'130','131','132','133','134','137','138','139','140'}>}[AMOUNT] )
-sum( {<NOTE = {'120','121','123'}>}[AMOUNT] )
-sum( {<GROUP_CODE = {'MA','MB','MC','MD','ME'}>}[AMOUNT] )
+sum( {<NOTE = {'150','151','160','161'}>}[AMOUNT] )*-1"
and you are calling vProfit in a Set Analysis..
Yes It is correct
The sum( sum() + sum()..) combination is not a valid one. You need to use aggr():
sum( aggr( sum(), ...) )
And using Set Analysis to filter data is bad practice.