Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
maahivee
Contributor III
Contributor III

Set expressions for current Quarter and Month sales.

Hello friends,

I have a requirement in my project, Where I have to write a set expression to determine current month and current quarter sales

But the problem is that i have tried so many different expressions and is not able to achieve it.

i have tried it in these ways

=num(Sum({$<Month = {'$(=Num(month(today()-1)))'}>} [Extended Price] ) ,'$#,###.') keeping in mind that the date in my DB is in Number format. I don't know where and what am i doing wrong. But this is kind of an urgent requirement for me.. Please help.

52 Replies
maahivee
Contributor III
Contributor III
Author

Sunny, I am getting a wired number like this $1.708e+007 but when when i put the other expression in a text box it is giving the april-jun.

sunny_talwar

Is this not the output you are expecting? Is there a way for you to check what you are expecting to get as result?

maahivee
Contributor III
Contributor III
Author

Yes i am expecting around 17Mllion as result.

sunny_talwar

So the only issue is the formating?

maahivee
Contributor III
Contributor III
Author

Also since we just entered into Q3 I want to show Q2 sales.

sunny_talwar

Isn't this already showing Q2 Sales (April - June)?

maahivee
Contributor III
Contributor III
Author

I thought it is just showing error since it is giving e.

sunny_talwar

No, I think the formatting needs to be fixed:

=Num(Sum({$<MonthYear = {"$(='>=' & Date(QuarterStart(AddMonths(Today(), -1)), 'MMM_YYYY') & '<=' & Date(QuarterEnd(AddMonths(Today(), -1)), 'MMM_YYYY'))"}>} [Extended Price] ) ,'$#,##0')

Try different formats here

$#,##0 or $#,##0.00 and see if something works.

Best,

Sunny

maahivee
Contributor III
Contributor III
Author

Thank you very much sunny changing the format did work.

sunny_talwar

‌Awesome... I am glad it worked.

Best,

Sunny