Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Greeting everyone
i have table has 3 column (Name,Year,Cost)

Imgur: The magic of the Internet[^]

so i'v created group by name in that table

because i need to add in last row (you can consider as total) for each Name

and that last row will be content Cost of Last Year for every name

Imgur: The magic of the Internet[^]

What I have tried:

i put this on total of cost
=IIF(Max(Fields!YEAR.value),Fields!Cost.value,0)
Posted
Comments
mohammed ahamed 8-Apr-20 10:22am    
this
=IIF(Max(Fields!YEAR.value),Fields!Cost.value,0)

give me error
CHill60 8-Apr-20 12:27pm    
Please don't post links to images. Some of us cannot follow those links if we do this in our spare time at work - which means fewer people can help you. There is no reason at all that you could not have put that information into the body of your question.
You haven't stated what the error is but
=IIF(Max(Fields!YEAR.value),Fields!Cost.value,0)
is not comparing Max(Fields!YEAR.value) to anything - you are saying "if max then use cost otherwise 0) … If max what? Greater than zero?
=IIF(Max(Fields!YEAR.value) > 0,Fields!Cost.value,0)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900