The simplest option would be to change the wording to "Total sales changed by <monthly change> in <current month>." and have the positive/negative value of monthly change indicate if it is increasing/decreasing. But, if you want to be able add that dynamic wording you should be able to with a calculation. I've used Superstore to demonstrate example, writing a calculation "Dynamic Text"
that has the structure:
IF [Monthly Change] >= 0
THEN "increased by"
ELSE "decreased by"
The result is the snapshot below (and see attached workbook as well), where I've put the dynamic text in the tooltip.
Hope this helps.
Dynamic Text.twbx 1.2 MB
I will assume you have made the appropriate calculation
so yes you can create an IF then statement something like
label = If [monthly change] > 0 then " increased by ' else ' decreased by' end
Then you other statement (could be in a tool tip) = 'Total sales' + [label ] + 'by ' +str([monthly change]) + ' for the month ' + str([current month])
You may need to play with the syntax depending on the calculations you used and the actual value of the change may need to be rounded
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
You will need datevalue or datepart, str and IF functions and perhaps some LOD but it is possible.
Thank you Jacob! This did work.
Now, what if the number did not change? So [Monthly Change] = 0.