Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys, I'm trying to solve one expression but without sucess.
I have the following set analysis:
IF([DATABASE]='01/09/2019',
(((SUM([RISCO_CREDITO])
+((SUM([RISCO_FRN])*-1)*4.1644)),
IF([DATABASE]='01/08/2019',
(((SUM([RISCO_CREDITO])
+((SUM([RISCO_FRN])*-1)*4.1385)))
When I use this created variable vRISK on a bar chart it works perfect.
Now I'm trying to use it on a static KPI that needs to show me the value of MAX(DATE).
So I chaged the IF Statement to use IF((MAX([DATABASE])='01/09/2019', but it doesn't work.
Could you help me guys?
Is this the expression you tried (make sure you have placed the parenthesis at the right places)
If(Max([DATABASE]) = '01/09/2019',
((Sum([RISCO_CREDITO]) + ((Sum([RISCO_FRN])*-1)*4.1644)),
If(Max([DATABASE]) = '01/08/2019',
((Sum([RISCO_CREDITO]) + ((Sum([RISCO_FRN])*-1)*4.1385))))
@sunny_talwar is returning me NULL in my KPI
Would you be able to share a sample to show this?
@sunny_talwar I corrected, but my KPI is not respecting the max date. I mean the calc just works when I select one DATE, if not looks the calc sum all dates.
I cant share because I'm not able to export.
In a KPI object with no dimensions?
Yes, Into a KPI object that need to show always the value of MAX DATE, if I select any another month it should calc also.
I am not sure I follow your request... can you may be share some mocked up data and explain what exactly needs to be the output based on no selection and selection in different months?
I did it.
So on my KPI is returning the value for 01/09/2019 (my max date) correctly, for example when I select 01/08/2019 is not calc and returns NULL it should to show the value for 01/08/2019.
If(Max([DATABASE]) = '01/09/2019',
((Sum({<DATABASE]={"$(=MAX([DATABASE]))"}>}[RISCO_CREDITO])
,
If(Max([DATABASE]) = '01/08/2019',
((Sum({<[DATABASE]={"$(=MAX([DATABASE,2]))"}>}[RISCO_CREDITO])
How did this get added to the expression?
Max(DATABASE, 2) won't be 01/08/2019 when 01/08/2019 is selected? Max(DATABASE) will be 01/08/2019. And this is not even the expression I shared? If you are going to use an expression which is different from the one that is shared, how do you expect it to work?
Best,
Sunny