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

Ignoring Field not working

Hi All,

I am facing below issue. I have used below  Set expression to calculate sale, ignoring month selection. And I am getting correct result.

SUM({<[Month Name]=>}Amount_m_USD)

Sale.PNG

But When I am updating the same set expression as below (where format value is a drop down value to convert into K$ , M$). 

SUM({<[Month Name]=>}Amount_m_USD)*only(FormatValue)

I am getting only Feb month value ( as it is selected) and not getting other month's value.

 

Sales_WithFormat.PNG

Could any one help me with this.

 

Thanks 

Labels (1)
1 Solution

Accepted Solutions
MikeW
Creator
Creator

Your syntax is ok, so it might be something with the data model. You can try this {<[Month Name]=>}Amount_m_USD*FormatValue).

For debugging, I suggest adding FormatValue in your table so you can see which one is giving you the null value.

View solution in original post

9 Replies
MikeW
Creator
Creator

The Only() function needs to have the same set analysis to ignore the field you want.
gayatri7
Creator II
Creator II
Author

Thanks for your reply.

Could you please tell me the syntax for that. Should I write expression inside the existing one.

 

gayatri7
Creator II
Creator II
Author

I tried below expression ..still no result.

 

SUM({<[Month Name]=>}Amount_m_USD) * Only({<[Month Name]=>}FormatValue)

MikeW
Creator
Creator

What is FormatValue? Is it a field and what does the data model looks like?

gayatri7
Creator II
Creator II
Author

Format Value is a field in a drop down to convert the amount to K$ , m$..

It's inline table as below

Format: Load * Inline [
Format, FormatValue
m$, 1
k$, 1000

];

MikeW
Creator
Creator

Do you get any values if you just selected k$ and just used this?

SUM({<[Month Name]=>}Amount_m_USD) 

gayatri7
Creator II
Creator II
Author

for me default is m$. So if I use only below expression. It stays the same. Amount don't convert to thousand even if I select k$

SUM({<[Month Name]=>}Amount_m_USD) 

 

but when I multiply with FormatValue. I do get  converted result. only issue is ..it is not ignoring month selection (please ref my second screenshot in previous post)

MikeW
Creator
Creator

Your syntax is ok, so it might be something with the data model. You can try this {<[Month Name]=>}Amount_m_USD*FormatValue).

For debugging, I suggest adding FormatValue in your table so you can see which one is giving you the null value.

gayatri7
Creator II
Creator II
Author

Thank you so much... this expression works for me perfectly.