web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Combine seperate lookupsets - find max(), count()?

(0) ShareShare
ReportReport
Posted on by

Hello, my knowledge of SSRS is intermediate.  Enough to have a plan.  But I need just a little assistance.

Here are the functions.

here are my three lookupsets:

-LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, “AccountActivities”)

-LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, “AccountContactActivities”)

-LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, “AccountOpportunityActivities”)

1) How could I find the 'Max()' of all three of these datasets.  The single highest number.

2) How could I find the 'COUNT()' of all three of these datasets.   The total number of rows.

If they can be done separately and then added together using variables, that is an acceptable solution.  Still, I'm just learning syntax here.

Thanks

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Combine seperate lookupsets - find max(), count()?

    For Count I have an untested idea.   For Max still brainstorming.

    Count(LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, “AccountActivities”)) + Count(LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, “AccountContactActivities”)) + Count(LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, “AccountOpportunityActivities”))

  • Aileen Gusni Profile Picture
    44,524 on at
    RE: Combine seperate lookupsets - find max(), count()?

    Hi dbsarab,

    Are they in the same group? In one tablix or list?

    Cant you just use the standard max function against your data set?

    I found only on separate you need to store in variable

    salvoz.com/.../sum-result-of-ssrs-lookupset-function

    Hope this helps!

    Thx

  • Community Member Profile Picture
    on at
    RE: Combine seperate lookupsets - find max(), count()?

    They're in one field (probably a textbox).  I just to find the max of a value in three different datasets.  Not the max individually, but the total max of all three.

  • Community Member Profile Picture
    on at
    RE: Combine seperate lookupsets - find max(), count()?

    I'll post my logic.   I think it's obviously what I'm trying to do.   Tell me what's wrong with it if you can.  I looked at your link and tried it.  It would apply only to second one.  I got red lines when I tried it.

    1) Here I’m trying to get the max of three lookupsets, against the main lookupset in  table.

    =Max(Max(LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, "AccountOpportunityActivities")), Max(LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, "AccountActivities")), Max(LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, "AccountContactActivities")))

    2) Here I’m trying to get the Count of three lookupsets, against the main lookupset in  table

    =Count(LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, "AccountOpportunityActivities")) + Count(LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, "AccountActivities"))  + Count(LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, "AccountContactActivities"))

    3) Here I’m getting the sum of one lookupset, against the main lookupset in  table

    =Sum(LookupSet(Fields!name.Value, Fields!name.Value, Fields!estimatedvalue.Value, "OpportunityAccount"))

  • Community Member Profile Picture
    on at
    RE: Combine seperate lookupsets - find max(), count()?

    Hey Dbasarab,

    I think you have to try this for summing all LookupSet number of rows ,

    =LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, “AccountActivities”).Length
    + LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, “AccountContactActivities”).Length + LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, “AccountOpportunityActivities”).Length

    Please Let me know if this expression satisfied your criteria.

    Thanks !

    Santa

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans