Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello :
in my case , I want to set a variable, and then put the variable into a KPI/BAR CHART .but I find it is not working for me.
my Step 1:
Set getLastMonth = monthname(Max([Refresh Date]));
Set KPI = Sum({$<[Refresh Date]={"$(=$(getLastMonth))"}>} [Total]) ;
my Step 2:
in a KPI, I put
$(KPI)
but it is not working for me , it just return '0'.
my Step 3:
I put Sum({$<[Refresh Date]={"$(=$(getLastMonth))"}>} [Total]) directly into the KPI, then it is working and return correct value.
thanks
Xu Zhao
BTW,
I also tried put variable KPI in the chart, and
it only returns Sum({$<[Refresh Date]={""}>} [Total]) , which means it did not get $(=$(getLastMonth))
Hi,
and with this :
Set KPI = | Sum({$<[Refresh Date]={"=$(getLastMonth)"}>} [Total]) ; |
it should work
regards
can you share your app?
how expression you set in variable? with "=" or without = ?
Hi Olivier,
I also tried your statement, but it will not only return the last month, it returns all months.
so that I have to do Sum({$<[Refresh Date]={"$(=$(getLastMonth))"}>} [Total]) .
From software development point of view, I do not like to use the statement directly in the wiget.