Forum Discussion
Set of fields in Field Parameters
Hello, I need some help on the Field Parameters..
My table has about 30 columns and with that, it is best if some columns are frozen. But because the Table visual does not have a freeze columns option (only the Matrix visual does but my data is mostly composed of descriptive columns, not figures, so the Matrix visual messes up the view I want to), I thought of maybe having a selection for the user where the user will select the category for the fields the user wants to have in the table. And this leads me to the Field Parameters.
The Field Parameters feature lets the user select the specific column to apply on the visual. However on my case, I want my selection to be a group of columns.
Where
Set A will be Field-1, Field-2, Field-3, Field 4
Set B will be Field-5, Field-6, Field-7
Set C will be Field-8, Field-9, Field-10
Set D will be Field-11, Field-11
How do I achieve this? Thank you!
2 Replies
- Idrissshatila
Super User
Hello crln-blue ,
so you add the classification after the order in the field parameter dax as the following
Parameter = { ("field-1", NAMEOF('Table'[field-1]), 0,"Set A"), ("field-2", NAMEOF('Table'[field-2]), 1,"Set A"), ("field-3", NAMEOF('Table'[field-3]), 2,"Set A"), ("field-4", NAMEOF('Table'[field-4]), 3,"Set A"), ("field-5", NAMEOF('Table'[field-5]), 4,"Set B"), ("field-6", NAMEOF('Table'[field-6]), 5,"Set B"), ("field-7", NAMEOF('Table'[field-7]), 6,"Set B"), ("field-8", NAMEOF('Table'[field-8]), 7,"Set C"), ("field-9", NAMEOF('Table'[field-9]), 8,"Set C"), ("field-10", NAMEOF('Table'[field-10]), 9,"Set C"), ("Field-11", NAMEOF('Table'[Field-11]), 10,"Set D"), ("Field-12", NAMEOF('Table'[Field-12]), 11,"Set D") }If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Follow me on Linkedin
Vote for my Community Mobile App Idea 💡 - jtspilker
Helper I
create a new field parameter (if you haven't already). Once you select the measures you want included, Power BI will automatically create a calculated table for you with the form of
("MeasureName1", NAMEOF([MeasureName1]),0)for each measure.
You can then manually edit this table by adding another column (with a comma after the number that denotes priority - 0 above) and typing in what you want the category called. Attached is an example where I've done this, though I just used 2 categories.
Basically, you're just telling Power BI which measure belongs to which category. In the Table view, you can then rename this column you manually added to be whatever you want (I called it MeasureType)
You can then add in MeasureType (or whatever you want to name your set of categories) to your slicer that users interact with to select the set of measures they want to see