The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I'd like to change the parameter field "Value" based on filtering another field. For example, if Category = "A" is selected,
Value should change the name to "A" in the Parameter slicer.
Is there a possibility to adjust the DAX statement for "Value" with this requirement?
Solved! Go to Solution.
Hi @Dn_wemn
I have attached a small example PBIX showing how you could tackle this via modelling.
You can't have dynamic expressions in the field parameter table definition, because the values within the table cannot respond to filters in the report.
In this case I would suggest
The exact setup may need to be adjusted to fit with your existing model.
In my sample, the report page looks like this:
Here is the definition I used for the field parameter table:
Parameter =
VAR CategoryValues =
ALLNOBLANKROW ( Category[Category] )
VAR ValueRows =
SELECTCOLUMNS (
CategoryValues,
"Value1", Category[Category],
"Value2", NAMEOF('_Account'[Measure 2]),
"Value3",1,
"Category", Category[Category]
)
VAR AccountRows =
SELECTCOLUMNS (
CategoryValues,
"Value1", "Account",
"Value2", NAMEOF('_Account'[Account]),
"Value3",0,
"Category", Category[Category]
)
RETURN
UNION (
ValueRows,
AccountRows
)
This produces a table like this:
The model diagram looks like this:
Does something like this work for you?
Regards
Hi @Dn_wemn
I have attached a small example PBIX showing how you could tackle this via modelling.
You can't have dynamic expressions in the field parameter table definition, because the values within the table cannot respond to filters in the report.
In this case I would suggest
The exact setup may need to be adjusted to fit with your existing model.
In my sample, the report page looks like this:
Here is the definition I used for the field parameter table:
Parameter =
VAR CategoryValues =
ALLNOBLANKROW ( Category[Category] )
VAR ValueRows =
SELECTCOLUMNS (
CategoryValues,
"Value1", Category[Category],
"Value2", NAMEOF('_Account'[Measure 2]),
"Value3",1,
"Category", Category[Category]
)
VAR AccountRows =
SELECTCOLUMNS (
CategoryValues,
"Value1", "Account",
"Value2", NAMEOF('_Account'[Account]),
"Value3",0,
"Category", Category[Category]
)
RETURN
UNION (
ValueRows,
AccountRows
)
This produces a table like this:
The model diagram looks like this:
Does something like this work for you?
Regards