Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have created the following table:
Here the expression I have used for the "Cost %" for the current month
num(sum(Cost)/ Sum(total(Cost)), '#,0%')
My problem is with the expression I have created for the "Cost %" for the YTD:
num(sum({<vYTD>}Cost)/ Sum(total({$<$(vYTD)>}Cost)), '#,0%')
What am I doing wrong? How can I calculate the percentage of the cost for the YTD? Or how can I calculate the total with a Variable?
Thank you in advance for your help!
Iuri
I did not just change the number formatting, but also removed the parenthesis after TOTAL, did you try to remove that from your expression:
num(sum({<vYTD>}Cost)/ Sum(total({$<$(vYTD)>}Cost)), '#,0%')
Give this a try:
Num(Sum({<vYTD>}Cost)/Sum(TOTAL {<$(vYTD)>}Cost), '#,##0.0%')
Actually how do you define your variable vYTD?
Hi,
What Contains your vYTD variable?
Hello Sunny,
Thanks for your reply.
That does not work as well, even if the problem were the number format that would show any value, but all I get is '-'.
Hello Settu,
Here whats inside the variable:
Month=,RelativeMonthID=, MonthID={"<=$(=Max(MonthID))"}, YearID={$(=Max(YearID))}
Thanks for your help.
What is this variable vYTD? Can you show the expression behind this variable? Is it working for YTD Cost???
I did not just change the number formatting, but also removed the parenthesis after TOTAL, did you try to remove that from your expression:
num(sum({<vYTD>}Cost)/ Sum(total({$<$(vYTD)>}Cost)), '#,0%')
Here the Varible:
Month=,RelativeMonthID=, MonthID={"<=$(=Max(MonthID))"}, YearID={$(=Max(YearID))}
Yes you Right!
It came up a large number, but I will validate that is correct.
Thank you very much