Forum Discussion
Anonymous
4 years agoNot applicable
Help with VAR statement (result)
jj
I am trying to add another option to my "return" statement below. I have the answer for if the first VAR statement is true...now I need show what the result be if the second VAR statement is t...
- Anonymous4 years ago
CNENFRNL Anonymous Ashish_Mathur Samarth_18 Thanks all for your help. In the end, I was able to get it to work with this which was a lot simpler than I thought.
Net Revenue (not including current month) =IF(SELECTEDVALUE('Net Revenue Table'[Reconciled?]) = "Yes",[Sum of Net Revenue],IF(SELECTEDVALUE('Net Revenue Table'[Reconciled?]) = "No","Pending",""))
Samarth_18
4 years agoCommunity Champion
Hi Anonymous ,
If I took your question correctly then you can try below options:-
1. If you wanted to sum both the result then you can try this:-
Total Estimated Forecast =
VAR _Reconciled = FILTER('Net Revenue Table','Net Revenue Table'[Reconciled?] = "Yes")
VAR _NotReconciled = FILTER('Net Revenue Table','Net Revenue Table'[Reconciled?] = "No")
Return
CALCULATE([Sum of Net Revenue],_Reconciled) + CALCULATE([Sum of Net Revenue],_NotReconciled)
2. If you want to show both the result on cards then you can try like:-
Total Estimated Forecast =
VAR _Reconciled =
FILTER ( 'Net Revenue Table', 'Net Revenue Table'[Reconciled?] = "Yes" )
VAR _NotReconciled =
FILTER ( 'Net Revenue Table', 'Net Revenue Table'[Reconciled?] = "No" )
RETURN
"For Reconciled YES " & CALCULATE ( [Sum of Net Revenue], _Reconciled ) & " " & "For Reconciled YES "
& CALCULATE ( [Sum of Net Revenue], _NotReconciled )
Or please share the expected output with examples.
Thanks,
Samarth
Anonymous
4 years agoNot applicable
Samarth_18 Hi Samarth - I am not looking to sum them together, but rather give a result depending on which VAR is true. If the _reconciled is true it needs to return the sum of net revenue. If it is not true (i.e. if _notreconciled is true, then I have a different measure I need to use.