Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3560

Formula Not working Properly

$
0
0

Hello All,

 

I have a requirement where I need to calculate the total cash in hand for certain GL Accounts.

I have created a formula but that does not seem to work properly, so need your guidance to correct the same.

 

FIrst I am getting month from Start Date i.e. Month([Start Date])

 

Now using this variable I am creating another variable of type measure where I need to get the Opening Balance of Cash in Hand:

 

=If [Month]= "April" Then Sum([Balance carried forward in local currency]) ElseIf [Month]= "May" Then Sum([Balance carried forward in local currency]+[Total of transactions of the period in local currency \[HSL01\]]) ElseIf [Month]= "June" Then Sum([Balance carried forward in local currency]+[Total of transactions of the period in local currency \[HSL01\]]+[Total of transactions of the period in local currency \[HSL02\]]) ElseIf [Month]= "July" Then Sum([Balance carried forward in local currency]+[Total of transactions of the period in local currency \[HSL01\]]+[Total of transactions of the period in local currency \[HSL02\]]+[Total of transactions of the period in local currency \[HSL03\]]) Where ([A/C Number] Between(210000;210999))

 

This formula works only for the last month provided i.e. "JULY" in this case. If I run the report for May or April it gives output for all the records which are not between the given range of account number as well i.e. 210000 to 210999.

 

Please help me out here, so that the formula works for all the given months.

 

 

Regards

Sandeep


Viewing all articles
Browse latest Browse all 3560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>