Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do I calculate GP for just the current month?
i tried =Sum(If(Month=(Today()),GrossProfit))
but ts not working.
Any ideas?
Thanks
So both values display as "Jul". In that case it sounds like a simple date mismatch issue.
I assume your month field is a string saying "Jul" instead of an actual date value, while month(Today()) returns "Jul" but with an underlying numeric value, 7.
Take Miha's suggestion and add:
Sum( {<Month = {'$(=text(Month(Today())))'}>} GrossProfit)
Which should work fine with Jonathan's suggestion as well as you need to make sure the string values match up.
If Month here is a field, then try this
=Sum(If(Month=Month(Today()),GrossProfit))
nope didnt wrk.any other ideas?
Is Month a field in the model? If so, is it in a format that can be compared with what's returned from the Month() function?
I usually avoid field names like Day, Month, Year as they are too easily confused with the built in functions.
Its a field yes, and the Month() functon doesnt work tho
Hi Blaze,
I think you would make this a lot easier to answer if you uploaded an example document. That way everyone can see your date formatting and you should have a quick answer in your hands as there's a number of things that could cause the expression not to return a value.
What about Set Analysis?
Sum( {<Month = {'$(=Month(Today()))'}>} GrossProfit)
Regards,
Miha
I dnt think its possible guys. really sorry. If i enter Month(today()) then it returns the month.
Hey Miha
Close, but its returning the total Gross Profit, not just for this month.
is it possible, that you have different values in Month and Month(Today())?
Example: you have Month = jan, and Month(Today()) returns 1?