Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I have created below paramater for multi dimensions ,
Dim Selector = {
Solved! Go to Solution.
And you seem to have created a calculated as 'Dim Selector'[Dimension Selector] isn't aggregated. Calculated columns, unfortunately, do no respond to slicer selections. They are not aware of what's been selected in a slicer.
Instead, create a measure that references the parameter order field otherwise you'll get an error similar to below:
"Parameter columns is part of composite key, but not all columns of the composite key are included in the expression or its dependent expression".
Column switching rank =
SWITCH (
SELECTEDVALUE ( DimSelector[DimSelector Order] ),
0, [Rank by Supplier],
1, [Rank by Hotel],
2, [Rank by Agency]
)
Use the correct measure for each parameter order field value. Use the parameter field and the measure above in your visual.
Please see attached sample pbix
Note: Ignore the other pages.
Proud to be a Super User!
hi @rajendraongole1 Thanks for the quick response while using this calculation below error is reflecting.
"Column [Dimension Selector] is part of composite key, but not all columns of the composite key are included in the expression or its dependent expression".
then in that case, you can create a calculated column in the DIM Selector table to flatten it into a single unique key
UniqueKey = 'Dim Selector'[Dimension] & "-" & 'Dim Selector'[Expression]
check with UniqueKey column instead of Dimension Selector in your slicer and calculations.
Let me know if it works.
Proud to be a Super User! | |
What is 'Dim Selector'[Dimension Selector] in 'Dim Selector' table? Creating a field parameter from scratch creates three columns starting with the column name and followed by table name + Fields and table name + Order. Is that a measurei in Dim Selector table or a column?
Proud to be a Super User!
And you seem to have created a calculated as 'Dim Selector'[Dimension Selector] isn't aggregated. Calculated columns, unfortunately, do no respond to slicer selections. They are not aware of what's been selected in a slicer.
Instead, create a measure that references the parameter order field otherwise you'll get an error similar to below:
"Parameter columns is part of composite key, but not all columns of the composite key are included in the expression or its dependent expression".
Column switching rank =
SWITCH (
SELECTEDVALUE ( DimSelector[DimSelector Order] ),
0, [Rank by Supplier],
1, [Rank by Hotel],
2, [Rank by Agency]
)
Use the correct measure for each parameter order field value. Use the parameter field and the measure above in your visual.
Please see attached sample pbix
Note: Ignore the other pages.
Proud to be a Super User!
@danextian Highly appreciated! this file helped me understand my mistake, actually I was adding as a colum for switch calc despite of measure. now I have changed it to Measure from Column and its working fine now.
Hi @latifshaikh145 - Your SWITCH statement appears to be correctly set up in principle, but the issue may be related to how the Dimension Selector value is being passed or recognized.
Use SELECTEDVALUE to ensure only one value is retrieved.
Selected Dimension = SELECTEDVALUE('Dim Selector'[Dimension Selector])
Now , use the measure:
Rank =
SWITCH(
[Selected Dimension],
"Supplier", [Rank by Supplier],
"Hotel", [Rank by Hotel],
"Agency", [Rank by Agency],
BLANK()
)
Proud to be a Super User! | |
User | Count |
---|---|
121 | |
69 | |
66 | |
56 | |
52 |
User | Count |
---|---|
181 | |
85 | |
67 | |
61 | |
53 |