Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sum If Condition

Hello all!!!

I need help,  i have the above expression but it doesn't work...

if(YEAR='2016' and Store='FO Type 5', sum(TOTAL PARTPATT='5 ΕΜΠΟΡΕΥΜΑΤΑ FO'[Net Sales]))

All the green fields are dimensions.

I want to make that calculation..

if year =2016 and store=FO Type 5 then calculate the Total sum of Net Sales but for a different dimension wich is PARTPATT=5 ΕΜΠΟΡΕΥΜΑΤΑ FO

Thank you very much in advance!

Kyparisia

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Super it works.. but i have to choose the Year 2016 from my listbox in order to work!

Any idea how i can avoid this?

View solution in original post

5 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

try this

if(YEAR='2016' and Store='FO Type 5', sum(TOTAL if(PARTPATT='5 ΕΜΠΟΡΕΥΜΑΤΑ FO',[Net Sales])))


Anonymous
Not applicable
Author

Super it works.. but i have to choose the Year 2016 from my listbox in order to work!

Any idea how i can avoid this?

rahulpawarb
Specialist III
Specialist III

Hello Kyparisia,

In this case you have to use Set Analysis. I have created a sample expression as given below (You need to further modify it, if required).

Sum({<YEAR={'2016'}, Store={'FO Type 5'}, PARTPATT={'5 ΕΜΠΟΡΕΥΜΑΤΑ FO'}>}TOTAL [Net Sales])

Hope this will be helpful.

Regards!

Rahul

Anonymous
Not applicable
Author

Hello Rahul,

It doesn't work because the dimension Store={'FO Type 5'} doesn't have Net Sales for PARTPATt={'5 ΕΜΠΟΡΕΥΜΑΤΑ FO'} it has only Net sales for {'1 ΕΜΠΟΡΕΥΜΑΤΑ FO'}

but i want in this line were the 'FO Type 5' is, to show the Total  Net Sales of {'5 ΕΜΠΟΡΕΥΜΑΤΑ FO'}

I know it's a bit confusing, but i have to show it this way! Plz tell me if you have anything in your mind that might help.

Thank you so much...

rahulpawarb
Specialist III
Specialist III

Hello Kyparisia,

Thank you for sharing your inputs.

For accurate feedback could you please share application with sample data?

Regards!

Rahul