I was working with a customer where they had a lot of measures which they wanted to use with the awesome Field parameters for measures.

The challenge was that there was a LOT of measures, and I wanted to see if there was a way to create a hierarchy in my field parameters so that it would be easier to find the measure.

I have to give credit to Gerhard Brueckl with his blog post Using Power BI Field Parameters to translate Data and Values, where I have adapted this for my requirement.

In my example I am going to create a hierarchy for Sales measures and Order measures.

The first field parameter table that I need to create I am going to call my Measure Grouping. This is the field parameter table which in which I will have the groupings.

To create the table, I clicked on the New Parameters, Field Parameters.

Next, I put in the first field in the list (this is because in the subsequent steps I am going to make a change).

I then clicked on Create.

I could then see my Field Parameters table.

I then changed the values in my parameter table for my required groupings as shown below.

If I now look in the data view, I can then see the table values for my measure grouping.

Next, I create my Measure Selections field parameter table as shown below.

I clicked on Create.

Once again, I could see the field parameters details.

This is the part where I change the field parameters to allow me to create the hierarchy.

To do this, I add an additional value to my field parameters as shown below. When I was testing this out for the blog post, I had to create a single value in the parameter table. This would then allow me to create the relationship in the subsequent steps.

As you can see below where I want my measures to be grouped by Sales, I give it the name of Sales, and where I want it to be grouped by Orders I give it the name of Orders.

Once again, I can look at this table in the data view. What I then did was to change the Value4 to be called “Measure Grouping” by double clicking Value4 and then renaming it.

The final step the final step to get this working is I need to create a relationship between the measure group table and the measure selections table.

Then went into the manage relationships table and created a one-to-many relationship between the tables.

What I then did was to add in my additional measures that I wanted in the hierarchy so that my table “Measure Selections” as shown below.

I then created my Slicer where I put in the fields from my Measure Grouping and then the Measure Selection into the slicer as shown below.

And finally, after all that work I can now see my hierarchy for my field parameters as shown below

Summary

Thanks for reading, I hope you found this useful and can use it in your reports.