Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
RutiTaumanRubin
Creator
Creator

Help with calculating measure

Hi,

I create measure with the following calculate:

sum(if($(V_SUM)=1,SALES,0)) / sum(COMP)

But the result is not correct.

Any Idea?

Thank you.

6 Replies
RutiTaumanRubin
Creator
Creator
Author

The variable V_SUM define as following:

SET V_SUM ="if(TYPE = 'A – A',1,0)";

Chanty4u
MVP
MVP

try with single quotes

sum(if('$(V_SUM)'=1,SALES,0)) / sum(COMP)

petter
Partner - Champion III
Partner - Champion III

What does the variable V_SUM contain?

What do you mean by "not correct"? Is it returning a null value - not returning any value or is it just a wrong number?

RutiTaumanRubin
Creator
Creator
Author

Thank you for your response

I have tried as you suggest but it didn't work ...

RutiTaumanRubin
Creator
Creator
Author

Hi,

Thank you for your response,

The variable V_SUM define as following:

SET V_SUM ="if(TYPE = 'A – A',1,0)";


it's return number , but wrong number.

satheshreddy
Creator III
Creator III

Hi Ruti,

Can you please share the sample file to understand your data and we will give some ideas to over come this issue.

Regards

Sathish