Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

how to write the expression to count the no of fields in SSRS.

Posted on by Microsoft Employee

Hello,

I am trying to write a expression that calculate the no of record in a form.

I have a two different fields named car park 1 and car park 2  as given bellow.

carpark.png

In my ssrs report, i need to count the no of the records from fields .

my condition is, if only car park 1 contains data then count should be 1 and if car park 1 & 2 both contains data then the count should be 2 otherwise 0 .

i am finding trouble to write the expression .

please help me to solve this error.

Thank You in advance.

*This post is locked for comments

  • Suggested answer
    Kishor Kumar Profile Picture
    Kishor Kumar 3,702 on at
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to write the expression to count the no of fields in SSRS.

     how i write a expression for if field contains data ?

  • Suggested answer
    Kishor Kumar Profile Picture
    Kishor Kumar 3,702 on at
    RE: how to write the expression to count the no of fields in SSRS.

    Hi Check this,

    stackoverflow.com/.../count-expression-ssrs-report

  • RE: how to write the expression to count the no of fields in SSRS.

    You can use a nested if for this, e.g IIF(condition;true;IIF(condition;true;false)), but considering your scenario it should look something like this:

    IIF (CarPark1.Value != '', IIF(CarPark2.Value != '', 2, 1), 0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans