Forum Discussion

Kumar_0606's avatar
Kumar_0606
Icon for Helper I rankHelper I
1 year ago
Solved

Creating a dynamic parameter with custom list of values

l am a Power BI Beginner, trying to create a dashboard which should filter data on the go.
I imported data from SAP HANA and created a matrix table. My calculation is
IF Steward = "Acc" then IF Account= "Accountable" then “ Amount” End
IF Steward= "Total" then IF Indicator IN ("F","L”) then “Amount” End End.

Steward is a parameter created in tableau with custom values "Acc" and "Total" not a direct field.

Any help would be highly appreciated

  • maruthisp's avatar
    maruthisp
    1 year ago

    Hi Kumar_0606 ,

     please try below steps as what I did in the pbix file.

     

     

    1. Sample data lives in FactTable with columns Account, Indicator, Amount.
    2. StewardParam is a small disconnected table with two text values, used in a slicer.
    3. SelectedSteward measure grabs the user’s pick.
    4. StewardedAmount uses SWITCH + CALCULATE to run only the filter logic you want for each mode.
    5. No relationships to manage—just drop the slicer and the measure into your report.

     

6 Replies

  • Hi Kumar_0606,

     

    I tried to implement the solution for you in the below attached pbix file. Please check it.
    Creating a dynamic parameter with custom list of values.pbix

     

    Please let me know if you have further questions.

    If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks! 

     

    Best Regards, 

    Maruthi 

    LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/ 

    X            -  Maruthi Siva Prasad - (@MaruthiSP) / X

    • Kumar_0606's avatar
      Kumar_0606
      Icon for Helper I rankHelper I

      Thanks Maruthi.

      I followed your steps and created a table and calculations however when I drag a simple table with Amount and a field the parameter is not filtering the data.

      Is there any binding or am I missing something. Pl suggest 

  • V-yubandi-msft's avatar
    V-yubandi-msft
    Icon for Community Support rankCommunity Support

    Hi Kumar_0606 ,

    Thanks for reaching out to the Microsoft Fabric Community. Could you please review the PBIX file shared by maruthisp  and confirm if it meets your requirements as expected?

     

    If it doesn't fully meet your needs, kindly share a few more details about your requirements so we can assist you further..

     

    Regards,

    Yugandhar.

  • Thanks Maruthi.

    I followed your steps in creating the table and calculations however when I drag simple table with Amount and field, the values are not getting changed in selecting the parameter values.

    Am I missing something, pls suggest.

    • maruthisp's avatar
      maruthisp
      Icon for Super User rankSuper User

      Hi Kumar_0606 ,

       please try below steps as what I did in the pbix file.

       

       

      1. Sample data lives in FactTable with columns Account, Indicator, Amount.
      2. StewardParam is a small disconnected table with two text values, used in a slicer.
      3. SelectedSteward measure grabs the user’s pick.
      4. StewardedAmount uses SWITCH + CALCULATE to run only the filter logic you want for each mode.
      5. No relationships to manage—just drop the slicer and the measure into your report.