Power Bi : Setting up Dynamic Parameters

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024

Комментарии • 71

  • @sojourner650
    @sojourner650 Год назад +3

    Thanks, Mr. Dash! I looked at sites and forums and never found an explanation that worked for me. Your video finally got me over the problem I had! I was about 90% of the way there a couple times, but I just couldn't get it to work without your video. I had some mistakes with the Parameter settings, and I also assumed we would hook up an SQL statement to the Parameter immediately, but no: it happens when we BIND the Parameter at the end. Thanks again!

  • @Patiencelad
    @Patiencelad Год назад +3

    Thank you so much! I looked into this about 6 months ago and was convinced it wasn't possible. Your explanation was very clear a d I will try this on a couple of my dashboards to achieve the desired effect and response time. Thank you again!

  • @QuantumIdeas
    @QuantumIdeas Год назад +2

    Wow. Kudos to this video. This is the most useful application of Field Parameterization in Power BI by far. Subscribed and liked. Couldn't thank you more.

  • @LudmilaSkřivánková-t6g
    @LudmilaSkřivánková-t6g Месяц назад

    Thanks a lot, this tutorial really helped me. I have troubles switching from SSRS to Power BI and this is exactly what I needed to know. Just perfect!

  • @paulb6442
    @paulb6442 2 года назад +4

    Great explanation, definitely interested on further videos incorporating row level security.

    • @DapperDash
      @DapperDash  2 года назад

      ruclips.net/video/vyR0uAbLdTk/видео.html&ab_channel=DapperDash

  • @lize2957
    @lize2957 Год назад +1

    This is great! I having a difficult time figuring this out. Thanks for sharing

  • @ganeshsingampalli3504
    @ganeshsingampalli3504 Год назад +1

    Great Explanation, provide more videos on dynamic connections. thank you from India

  • @shreekantgosavi4726
    @shreekantgosavi4726 Год назад

    This is so so good video Thanks Dapper Dash

  • @uttamx2016
    @uttamx2016 Год назад

    Nicely explained
    I am able to follow and will continue to watch other videos as well

  • @Lemmy_at_home
    @Lemmy_at_home 2 года назад +2

    Hi my friend
    nice explanation but:
    at position 11:11 you show the setting for "Bind to parameter"
    but in my May 2022 version the field doesn't exist.
    Which version did you use that?
    Or is that not possible with PBI Desktop for Reporting Server?

    • @irmdev595
      @irmdev595 2 года назад

      no one has this answer

    • @nyekoKimmy
      @nyekoKimmy 2 года назад

      having the same problem. Has anyone found any solutions yet?

    • @80Huang
      @80Huang 2 года назад

      i perform query through oracle database and having the same problem, hope there is solution for this

    • @kmedreda
      @kmedreda 2 года назад

      hello guys did you fond a solution ? i cannot found thé " Bind to parameter"

    • @Lemmy_at_home
      @Lemmy_at_home Год назад

      Hello, everyone,
      it now works in version: 2.112.1161.0 64-bit (December 2022).
      You only have to wait 5 months, then the solution will come almost by itself.
      Now I'm happy.
      If you still have questions, just leave a post.🤩

  • @rockfreedy
    @rockfreedy 2 месяца назад

    Hi this was fantastic, but is there a way to change the slicer to allow for multi-value selection? I would have to somehow change the custom query so that the values are not filtered by WHERE [Field1] =, but WHERE [FIeld1] IN....?

  • @moonaj89
    @moonaj89 Год назад

    I'm trying these steps with a custom query but using a date filter. I'm able to get it to work with a text filter but for some reason and having trouble with dates.

  • @dmmonera3866
    @dmmonera3866 2 года назад +2

    Great Video! Can you do a video that pass multiple values into the query.

  • @binxthecatnft3359
    @binxthecatnft3359 Год назад

    Im importing via an excel doc, I dont see the bind value anywhere. Ive also updated my power bi to the latest version any thoughts?

  • @allardbon1967
    @allardbon1967 2 года назад +2

    Great explanation! The next step is using the dynamic parameters for stored procedures instead of tables. Could you show us how you would do that? Thanks in advance.

    • @DapperDash
      @DapperDash  2 года назад

      Hey Allard. Good point. I used it recently in a stored procedure at my company. Let me look at putting a tutorial together. It's very similar to the way I set this one up.

    • @allardbon1967
      @allardbon1967 2 года назад

      @@DapperDash Ah, that is good news. Because I myself tried it and I cannot find a way to call a parameterized T-SQL stored procedure and bind the parameters to user-controls on the dashboard. So I see forward to your tutorial!

    • @kmedreda
      @kmedreda 2 года назад

      hello all , please there 's some update on it ?

    • @rogerpanfil877
      @rogerpanfil877 Год назад

      Game changer if this one can be figured out . . . Dapper Dash can you provide a video on dynamic parameters for Stored Procs????

    • @matthewdonut
      @matthewdonut Год назад

      ​​@@allardbon1967 did you ever figure out how to do this, or a similar workaroubd? Would love to hear a solution, i'm completely stuck

  • @OliveTreeAnalytics
    @OliveTreeAnalytics 10 месяцев назад

    Sorry im new to Power BI - For Direct query, the fact table would normally have IDs (Numbers) which you would want to filter, how do you pass the lookup names to filter the fact table IDs?

  • @wimb909
    @wimb909 Год назад +1

    Does changing the filter work with the customerquery? If I change it nothing happens

    • @DapperDash
      @DapperDash  Год назад

      I am not sure what you mean by changing the filter. But this should work with a custom query. The only reason it could fail is if you are passing multiple values. The example I shared is made for single value parameters

  • @surender665
    @surender665 Год назад

    Hi Please help me, I want update query parameter value based on card visual dynamically. How can i do it.

  • @musthakhahammed6535
    @musthakhahammed6535 2 года назад +2

    Thanks sir for the detailed explanation.
    I have some doubts to clear.
    Will this work in aggregations?
    Can we apply rls on this parameterized model?
    For example, I have a big dataset to query into my model. Dataset for different clients. I need to apply the dynamic RLS into the model using userprincipalname(). Then, can I use this parameters to query only for the specific client?

    • @DapperDash
      @DapperDash  2 года назад

      I have built models with RLS and Dynamic Parameters together. I don't believe you can apply an RLS rule directly on a table that is using a a field as the Dynamic Parameter, but you can build a model where some datasets leverage dynamic parameters and others RLS rules.
      And yes, you can use userprincipalname() as a way to dynamically filter a query. You cannot pass the DAX function into the M Query, but there are workarounds that allow you to capture the value from userprincipal() and pass it into a dynamic parameter query.
      I have done this before. It requires a little bit of set up so that your end user doesn't have to select a filter. In fact, they are unaware that dynamic parameters are going on in the background. Maybe we can find some time to chat and go over this.

    • @musthakhahammed6535
      @musthakhahammed6535 2 года назад

      @@DapperDash Big thanks for the reply.
      In my case, I have to parametarize the dataset using client name. And also the userprincipalname () will also configured for each client.
      Is that possible to use both parameters and rls togather in my case?
      And could you mention some workarounds to make this work?

    • @DapperDash
      @DapperDash  2 года назад

      Sorry it took me a while to get you the solution: ruclips.net/video/vyR0uAbLdTk/видео.html

  • @irmdev595
    @irmdev595 2 года назад

    i made sure i checked matching data types and its a direct query but i cannot see the bind to parameters option in the advanced tab
    any clue why?

    • @DapperDash
      @DapperDash  2 года назад

      Are you querying against a TSQL data source? (Azure, MSSQL, MYSQL...). I have also seen it bug where I have had to delete the parameter and recreate it.

  • @dikkhaict
    @dikkhaict Год назад +1

    Thanks for the tutorial

  • @rebekah0207
    @rebekah0207 3 месяца назад

    Can you do a video on how to handle a parameter with multiple values (countries in your case)? I have a list of accounts in a PowerQuery table that I want to filter by in SQL Server, rather than pulling 1.5M records back into PowerQuery. The time difference is 2 seconds vs 20 minutes. I can't figure out the exact MCode.

  • @nishtharawal2702
    @nishtharawal2702 Год назад

    Great Video! Do you have any video where I can multi select values?

  • @sravanpesari1145
    @sravanpesari1145 Год назад

    Thanks Dash!, can we implement this with Oracle stored proc

  • @Zikoago
    @Zikoago 2 года назад

    For some reason, it not working as a database source. I have the same tables in different databases and I want to change my source by parameter.

    • @Zikoago
      @Zikoago 2 года назад

      I have a table that contains the name of all the databases on my server and I want to use it as a parameter.

  • @anafhulu3369
    @anafhulu3369 2 года назад +1

    Thank you for sharing !!!

  • @chandlermanagementgroup8809
    @chandlermanagementgroup8809 Месяц назад

    Is there any way for this to work when using import?

  • @pudgepudge1548
    @pudgepudge1548 2 года назад

    Great tutorial, Do you know if this will also work for stored procedures that have parameters in them? i.e. the slicer can act as a value to pass through to a stored procedure?

  • @n.r.swapna7735
    @n.r.swapna7735 Год назад

    Can we implement this for redshift dB

  • @rogerwong4036
    @rogerwong4036 7 месяцев назад

    This is an excellent tutorial! Can you please show me how to pass multiple countries to a query?

  • @maniarasan10
    @maniarasan10 Год назад

    How to pass multiple values in the parameter

  • @namgaywangchuk1737
    @namgaywangchuk1737 2 месяца назад

    what about multiselection parameter

  • @prateekjain4308
    @prateekjain4308 Год назад

    That's Great explanation.

  • @nataliiaiatsenko7779
    @nataliiaiatsenko7779 11 месяцев назад

    Thanks a lot for your work!

  • @chriskeo392
    @chriskeo392 2 года назад +1

    Would this work on date type?

    • @DapperDash
      @DapperDash  2 года назад +1

      Yup, you can use a date. The Microsoft documentation page on dynamic query parameters uses a date field as an example:
      learn.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters

    • @chriskeo392
      @chriskeo392 2 года назад

      @@DapperDash gtfoh! Man you're the 👑

    • @chriskeo392
      @chriskeo392 2 года назад

      Ahh there are limitations,
      Can't use date slicer on it 📅!!!!

  • @DouglasABailey
    @DouglasABailey Год назад

    Thanks! Very helpful. Now I just need to get it to pass the username to the query.

  • @IsmaelSilvaHomrich
    @IsmaelSilvaHomrich 8 месяцев назад

    Sensacional!!!!! Muito obrigado.

  • @vincentmabutas700
    @vincentmabutas700 Год назад

    Hi this is very detailed tutorial you create which help me a lot. Would you mind how to retrieve list and put it in direct query?

  • @sahuanalogchannel
    @sahuanalogchannel 2 года назад

    Thank you for sharing this. I am able to perform till there but facing some issue with Select all option, can you please make a video on that. Please consider SQL SERVER data base

    • @DapperDash
      @DapperDash  2 года назад

      Saddam, There is an example of "Select All" and choosing multiple values here:
      ruclips.net/video/vNK4xygN8Xw/видео.html&ab_channel=MicrosoftPowerBI
      You can see the code at 10:54 into the video.

    • @DapperDash
      @DapperDash  2 года назад

      Here is the code you need. You also have to enable "Multi-Select" on the column properties. I can create a tutorial for you if you want:
      let

      param = if Type.Is(Value.Type(YOURFILTER),List.Type) then
      Text.Combine({"'", Text.Combine(YOURFILTER,"','") ,"'"}) else
      Text.Combine({"'",YOURFILTER,"'"}),
      selectAll = if Type.Is(Value.Type(YOURFILTER),List.Type) then
      List.Contains(YOURFILTER,"_SelectAll_") else
      false,
      query = "Select * From dbo.YOURTABLE",
      filter = if selectAll then " " else
      Text.Combine({" Where COLUMN in (", param, ")"}),
      finalQuery = Text.Combine({query,filter}),
      Source = Sql.Database("Server", "Database", [Query=finalQuery])
      in
      Source

    • @sahuanalogchannel
      @sahuanalogchannel 2 года назад

      Thanks a lot sir, but select all is not working in my case that's why I am worried about. I will watch this video again

    • @sahuanalogchannel
      @sahuanalogchannel 2 года назад

      @@DapperDash I just tried with SQL SERVER and it is working but with snowflake it not giving me the results I am testing it once again thanks

  • @Mukeshkumar-sl5cz
    @Mukeshkumar-sl5cz 2 года назад

    Very Informative Video. How can we insert a dynamic parameter like a dynamic list of individual values with brackets and inverted commas like ('A123','B123',C123') (not a cell reference or do no want to type individual values by creating a list parameter) which can fetch result by running the native SQL query from ODB. Appreciate your help or video on this!!
    Thanks Again!

  • @RajShankar66
    @RajShankar66 Год назад

    Good one . Cheers!

  • @Alireza-ih5vu
    @Alireza-ih5vu 2 года назад +1

    Perfect

  • @chriskeo392
    @chriskeo392 2 года назад

    😎 you are 👑
    More content on this content

    • @DapperDash
      @DapperDash  2 года назад +1

      Thanks for the love Chris. Hope all is well.

  • @francisjohn6638
    @francisjohn6638 Год назад

    Really wow :)