This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Power Bi have included a new “Field Parameters” feature in the May 2022 release.
I have created the following example, but you will need to enable the “Field Parameters” preview features to try it.
Click here to download my PBIX
It uses Field Parameters to allow a user to dynamically select a period (eg by Year, Quarter or month) and the metric (e.g. sales ordered or sales despatched).
I want to add [% or all] measure using Field Parameters.
So when Quarter and Order items is selected then Q3-2020 = 25% (8 / 32)
but when Quarter and Despatch items is selected then Q3-2020 = 18.75% (6 / 32)
Can you please fix the [% or all] measure using Field Parameters please ?
Only provide dynamic solutions using Field Parameters please. Thank you !
Click here to download my PBIX
% of all =
VAR valueforperiod = SUM(Metrics[Metric])
VAR valueforallperiods = CALCULATE(SUM(Metrics[Metric]), ALL('Calendar'))
RETURN
DIVIDE(valueforperiod,valueforallperiods)
Hi Community Support Team _ Eason
Thank you for the reply.
But there seems to have been a bit of misunderstanding.
I specifiaclly want to know if/how Field Parameteres can be included in measures.
Field Parameteres are a new preview feature in the May 2022.
Have you tried using Field Parameteres yet?
I already knew how to use ALL to calculate % for individual measures,
but I am curious if we can include Field Parameteres in any measures.
I just gave % as an example, but the question is about Field Parameteres in measures and not % per se.
Has anyone tried to build an advance reports with Field Parameteres inside measures yet?
Thank you
Hi, @speedramps
I'm afraid field Parameteres can‘t used for calculations. If you examine the generated code, you will see that it is essentially a parameter table that contains some values of type 'String'. Function ’SUM‘ cannot work with these string fields.
In my opinion, the field parameter is used to call the result of measure and the final result is still calculated in the corresponding measure.
Best Regards,
Community Support Team _ Eason
Thank you v-easonf-msft
Yeap, I am aware that Field Parameter creates Calculated Table in the background.
The run query then creates the "code" which you can grab using Performance Analyser and paste it into Dax studio.
Field Parameters are a new preview feature in the May 2022 release, and I hopeful someone will fathom how to use them dynamical in measures. Alberto has published a good video about it.
Perhaps “ALL” was a bad example and has side tracked my issue.
I might close this ticket in a few days it we dont get back on track, and raise another ticket with more emphasis on “Field Parameter in Measures”. It would be a good feataure to have.
Please can someone translate the suggestion and I will try it. Thank you.
Hi, @speedramps
I am sorry for my mistake. My default browser caused it to be automatically translated when I publish.
You should modify measure 'Order items' and measure 'Despatch items' instead of field parameter table Metrics[Metric]. Also, there is no actual numerical data in Table 'Metrics' to apply the 'SUM' function.
Please modify your original formulas as follows:
Ordered items =
VAR a =
CALCULATE (
COUNTROWS ( Facts ),
USERELATIONSHIP ( 'Calendar'[Date], Facts[Order date] )
)
VAR b =
CALCULATE (
COUNTROWS ( Facts ),
ALL ( 'Calendar' ),
USERELATIONSHIP ( 'Calendar'[Date], Facts[Order date] )
)
RETURN
a / b
Despatch items =
VAR a =
CALCULATE (
COUNTROWS ( Facts ),
USERELATIONSHIP ( 'Calendar'[Date], Facts[Depatched date] )
)
VAR b =
CALCULATE (
COUNTROWS ( Facts ),
ALL ( 'Calendar' ),
USERELATIONSHIP ( 'Calendar'[Date], Facts[Depatched date] )
)
RETURN
a / b
For more details ,please check my sample file.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 24 | |
| 23 | |
| 17 | |
| 15 |
| User | Count |
|---|---|
| 61 | |
| 36 | |
| 29 | |
| 22 | |
| 22 |