Forum Discussion

StevenT's avatar
StevenT
Helper V
9 months ago
Solved

Datatable options

Hi, is there a way to take this table to use the fields to populate the row in a matrix by changing the row based on what the user chooses (Field FieldName),  and create a button style out of this.. so when the user clicks a button, it changes the Dimension in a matrix row depending on what is chosen?

Here's my table

CategoryTable =
    DATATABLE(
        "Label", STRING,
        "FieldName",STRING,
        "Index", INTEGER,
        {
            { "Title", "TrackList[Title]", 0 },
            { "Genre", "Genre[Genre]",1 },
            { "Artist", "Artist[Artist]",2 },
            { "Album", "Album[Album]",3 },
            { "Record Label","RecLabel[RecLabel]", 4 },
            { "Region", "Region[Region",5 },
            { "Retail Sales - Tracks", "PurchasedFrom[PurchasedFrom",6 },
            { "Retail Sales - Albums", "PurchasedFrom[PurchasedFrom",7 }
        }  
    )
  • Anonymous's avatar
    Anonymous
    9 months ago

    Hi StevenT ,


    Thanks wardy912  and KNP Did you get a chance to try the solution that wardy912  suggested using Field Parameters?
    That approach is indeed the correct and simplest way to dynamically switch the dimension (like Category or Region) in your matrix rows.

    Once you’ve created the Field Parameter under Modeling - New Parameter - Fields, make sure to.

    1. Add the generated parameter field to the Rows section of your matrix visual.
    2. Create a slicer using the same parameter and set it to Button style (under Format → Slicer settings → Style → Tile).
    3. Now, when you click a button (e.g., Category or Region), your matrix will automatically switch the row dimension accordingly.

    This setup gives you exactly the button-style field switcher you were looking for.

    Thanks,
    Akhil.

4 Replies

  • Hi StevenT 

     

     You can use field parameters to alter a visuals contents by what the user has chosen.

     

    Go to Modelling, Parameters, drop down to fields


    Select whatever fields you want to choose from, for this example i've chosen category/region

     

     

    --------------------------------

    I hope this helps, please give kudos and mark as solved if it does!

     

    Connect with me on LinkedIn.

    Subscribe to my YouTube channel for Fabric/Power Platform related content!

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi StevenT ,


    Thanks wardy912  and KNP Did you get a chance to try the solution that wardy912  suggested using Field Parameters?
    That approach is indeed the correct and simplest way to dynamically switch the dimension (like Category or Region) in your matrix rows.

    Once you’ve created the Field Parameter under Modeling - New Parameter - Fields, make sure to.

    1. Add the generated parameter field to the Rows section of your matrix visual.
    2. Create a slicer using the same parameter and set it to Button style (under Format → Slicer settings → Style → Tile).
    3. Now, when you click a button (e.g., Category or Region), your matrix will automatically switch the row dimension accordingly.

    This setup gives you exactly the button-style field switcher you were looking for.

    Thanks,
    Akhil.