SSRS Report Builder Part 7.12 - Lookup, LookupSet and MultiLookup Functions

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

ความคิดเห็น • 64

  • @isumyfine1079
    @isumyfine1079 4 ปีที่แล้ว +6

    I really appreciate your videos, you have saved my days multiple time with your SSRS series.

    • @WiseOwlTutorials
      @WiseOwlTutorials  4 ปีที่แล้ว

      Thanks Isumy! Happy to hear that you've found the videos useful, thank you for taking the time to leave a comment!

  • @paulthompson6745
    @paulthompson6745 2 หลายเดือนก่อน +1

    This solved my issue perfectly...thank you.

    • @WiseOwlTutorials
      @WiseOwlTutorials  หลายเดือนก่อน

      Happy to hear that it was useful, thanks for watching and taking the time to comment!

  • @abcxyz6606
    @abcxyz6606 3 ปีที่แล้ว +1

    THANK YOU! was getting annoyed look upset didnt work, you showed me it was missing join. Your videos are super helpful. Much appreciated!

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว +1

      You're very welcome, happy to hear that the video helped! Thank you for watching and for taking the time to leave a comment!

  • @CozBlueOcean
    @CozBlueOcean 2 ปีที่แล้ว +1

    Very easy to understand and follow. Great video, thank you so much!

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      Happy to hear that you enjoyed it, thank you for watching and for taking the time to write a comment!

  • @taitu7538
    @taitu7538 3 ปีที่แล้ว +1

    Thank you for this video. I find it very intuitive and clear.

  • @ItsForUsio
    @ItsForUsio 9 หลายเดือนก่อน +1

    excellent video. Thank you for your work

    • @WiseOwlTutorials
      @WiseOwlTutorials  9 หลายเดือนก่อน

      Thank you for the kind comment and for watching!

  • @henriquedosprazeresmarceli1525
    @henriquedosprazeresmarceli1525 2 ปีที่แล้ว +1

    Thank you very much for the explanation! Extremely didactic!!

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      You're very welcome, thanks for watching!

  • @SohailKhan-si9mx
    @SohailKhan-si9mx 2 ปีที่แล้ว +1

    Great tutorial thank you!

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      You're very welcome, thanks for watching!

  • @hamedebrahim2908
    @hamedebrahim2908 9 หลายเดือนก่อน +1

    excellent Video

    • @WiseOwlTutorials
      @WiseOwlTutorials  9 หลายเดือนก่อน

      Thanks very much for watching!

  • @53421Mike
    @53421Mike 3 ปีที่แล้ว +1

    Great videos, have been making use of them quite a bit recently! On the final example, is there a way to sort the genres returned alphabetically?

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Thanks Mike! The easiest way would be to add an Order By clause to the query which populates the Genres dataset. Otherwise I think you're looking at a custom code solution like the one shown here stackoverflow.com/questions/60747732/how-to-sort-values-in-a-join-function-with-lookupset-in-ssrs
      I hope it helps!

  • @jordanshefman5606
    @jordanshefman5606 2 ปีที่แล้ว

    Thanks so much for the great video! For the MultiLookup function, is there a way to have an input array that is delimited by a character other than a comma; maybe by spaces or semicolons?

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      Hi Jordan! You can use the Split function to return an array from any type of delimited list.
      See the examples here for how to nest Split in the Multilookup function docs.microsoft.com/en-us/sql/reporting-services/report-design/report-builder-functions-multilookup-function?view=sql-server-ver16
      I hope it helps!

  • @programit7155
    @programit7155 3 ปีที่แล้ว

    should names match or the content of the fields only 8:09 Lookup()?

  • @haniomar1838
    @haniomar1838 ปีที่แล้ว

    Thank you so much. what if I need to lookupset multiple decimal or currency values and sum them in one value?

    • @WiseOwlTutorials
      @WiseOwlTutorials  ปีที่แล้ว

      Hi! You'll need to use a custom function to do this, you can see help here stackoverflow.com/questions/52208203/ssrs-how-to-sum-values-on-a-lookupset-expression
      I hope it helps!

  • @ChandrasekharChandu-j6n
    @ChandrasekharChandu-j6n ปีที่แล้ว

    How to join two shared datasets in SSRS report?

  • @TheIanhackett
    @TheIanhackett 2 ปีที่แล้ว

    When I do the lookup it only returns the first match. How do i get it to lookup all rows

  • @borisgarkun347
    @borisgarkun347 ปีที่แล้ว

    There is a row group in .rdl file(paginated report) which calculates some aggregate function for a certain period. So grouping is performed by this period. Dataset also returns data for the same period but 1 year ago.
    How can I add some column to the right side of the report which will perform the same aggregate function but for the same period 1 year ago? Which function should I use for it? So I should see in the row for this month(period) the aggregate value of this month and the month 1 year ago. Is there CTE functions in report builder?

    • @WiseOwlTutorials
      @WiseOwlTutorials  ปีที่แล้ว +1

      Hi! You might find videos 9.9 and 9.10 in this playlist useful th-cam.com/play/PLNIs-AWhQzcmEFHyxCRwA_gb29WOz5SJU.html&feature=shared
      I hope it helps!

    • @borisgarkun347
      @borisgarkun347 ปีที่แล้ว +1

      Yes, that helped me

  • @superfreiheit1
    @superfreiheit1 2 ปีที่แล้ว

    What is the difference between Lookupset and Multilookup?

  • @PraveenKumar-ld3bm
    @PraveenKumar-ld3bm 3 ปีที่แล้ว

    Can we use an aggregate function inside the lookup function?

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Praveen! Yes you can nest an aggregate function inside a lookup function. Here's an example which returns a description based on the sum of Oscar wins:
      =Lookup(
      Sum(Fields!OscarWins.Value),
      Fields!Wins.Value,
      Fields!Description.Value,
      "LookupTable")
      I hope it helps!

    • @PraveenKumar-ld3bm
      @PraveenKumar-ld3bm 3 ปีที่แล้ว

      @@WiseOwlTutorials Thank you but I want to return the sum of an X value based on other matching values.

  • @vahdettiryakiogluotomotiva87
    @vahdettiryakiogluotomotiva87 3 ปีที่แล้ว

    Hi, "director ID" is 3 different tables, how can we combine them in one line?

  • @johan5315
    @johan5315 3 ปีที่แล้ว

    Thank you! How do you know the reason behind an "error"? It says nothing..

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Johan! There isn't a way to do this in Report Builder unfortunately. Microsoft's suggestion is to use SQL Server Data Tools in Visual Studio to see more detailed error information docs.microsoft.com/en-us/sql/reporting-services/report-design/expressions-report-builder-and-ssrs?view=sql-server-ver15#Valid

  • @LHBCPF
    @LHBCPF ปีที่แล้ว

    how to use wildcard in case I'm looking for non exact matches, like prefixes should match only?

    • @WiseOwlTutorials
      @WiseOwlTutorials  ปีที่แล้ว

      Hi! You can't use wildcards but you can use functions to control which part of the text you're attempting to match. The example below matches the first three characters of the FullName fields between the Actor and Director datasets:
      =Lookup(
      Left(Fields!FullName.Value, 3),
      Left(Fields!FullName.Value, 3),
      Fields!FullName.Value,
      "Director"
      )
      I hope it helps!

    • @LHBCPF
      @LHBCPF ปีที่แล้ว +1

      @@WiseOwlTutorials thanks! I was actually able to make it work yesterday following this same approach with the Left function, I had some doubts because it kept underlying the field in red in the editor but it actually works. Thanks for your response!

    • @WiseOwlTutorials
      @WiseOwlTutorials  ปีที่แล้ว

      @@LHBCPF Excellent, happy to hear you got it working!

  • @Leelamay
    @Leelamay 3 ปีที่แล้ว

    How can i apply one parameter to more thn 2 tables so it will show filtered data in same report?

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว +1

      Hi Rajat! Do you mean database tables in your query or report item tables? Are you using query parameters or report parameters?
      We have many videos on using parameters in Report Builder starting at Part 10.1 in this playlist which might help you find the answer you need th-cam.com/play/PLNIs-AWhQzcmEFHyxCRwA_gb29WOz5SJU.html
      I hope that helps!

    • @Leelamay
      @Leelamay 3 ปีที่แล้ว

      @@WiseOwlTutorials thanks for your reply 🙏.. actually from same database i have to fetch three tables in same report which should be filtered by fourth table column’s parameter

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว +1

      @@Leelamay Hi Rajat! You can use the same report parameter in a filter on each of the three tables that you want to filter. I hope that helps!

    • @Leelamay
      @Leelamay 3 ปีที่แล้ว +1

      @@WiseOwlTutorials thank you

  • @sos4790
    @sos4790 3 ปีที่แล้ว

    i have been stuck tring to use lookup with more than 1 key ex:
    Lookup(Fields!ldv_accountid.Value & Fields!ldv_calendarid.Value,
    Fields!ldv_accountid.Value & Fields!ldv_calendarid.Value,
    Fields!brandNum.Value, "DataSetBrandNumber")
    thats not working not with & not with + can you help me please?

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Sara! The syntax of your formula looks correct. When you say that it's not working what exactly happens? Do you see an error message when you run the report?

    • @sos4790
      @sos4790 3 ปีที่แล้ว

      @@WiseOwlTutorials not sytax error the report runs but the column with the exp give me #error

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      @@sos4790 Hi Sara, I'm sorry but I don't have enough information to help. All I can suggest is checking the names of your fields and datasets carefully. Try going back a few steps and check that you return the expected result from a simple formula like =Fields!ldv_accountid.Value & Fields!ldv_calendarid.Value
      Check that each of the smaller expressions returns the expected results before attempting to piece it all together.
      I hope that helps!

  • @foxybark
    @foxybark 3 ปีที่แล้ว

    HOw does this look to you? I wrapped both keys in a string function just to be safe. But I'm still getting an error.
    =Lookup(
    Str(Fields!PH_Location_Code.Value),
    Str(Fields!Location_Code.Value),
    Fields!ID2021_YearTotal_NetIncome.Value,
    "Excel_DS")

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      It looks good to me. Did the error message provide any details?

    • @foxybark
      @foxybark 3 ปีที่แล้ว

      @@WiseOwlTutorials The report runs fine. Only the column with the above expression has '#error' for all rows.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      @@foxybark is it possible that your lookup table contains multiple matches for the lookup value?

    • @foxybark
      @foxybark 3 ปีที่แล้ว

      @@WiseOwlTutorials Great observation. I double checked and no duplicates. only 1 record per location code. Any other suggestions? I know you can only say so much without seeing the actual report. Anything helps.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว +1

      @@foxybark I don't have any other good suggestions I'm afraid but it seems to be a popular question on Stackoverflow, perhaps something here is useful? stackoverflow.com/search?q=ssrs+lookup+%23error&s=660fd4c0-349f-4691-be4b-73b0bba5221a

  • @JewK3r
    @JewK3r ปีที่แล้ว

    Hello,
    Nice work and well done for this tutorial.
    However, is it possible to have a row by result (multiples values part)
    For your exemple :
    ------------------------------------------------------------------
    20th Century Fox | 4 | Alien Convenant
    ------------------------------------------------------------------
    20th Century Fox | 4 | Deadpool 2
    ------------------------------------------------------------------
    And if yes, how ?
    Thank you for your help

    • @WiseOwlTutorials
      @WiseOwlTutorials  ปีที่แล้ว

      Hi! I don't think that the multiple values part of the video helps here. As far as I know, you can't create new detail rows using an SSRS expression. In the Film - Studio example we can easily create a separate row for each film by populating the table with the Title field from the Films dataset, then use the Lookup function to return the corresponding studio name.