Forum Discussion
One Slicer, multiple Parameters
Hi,
I already found a few topics about this and they have accepted solutions, but I just dont get it yet. Maybe its because Im not really sure how the field parameter syntax works.
I have two sets of measures im my model. To keep it simple its 4 in total.
Sales measure 1
Sales measure 2
Revenue measure 1
Revenue measure 2
What i want to do is, I want to show the two sales measures or the two revenue measures in a stacked bar chart, but one at a time depending on one slicer. So only the sales measures OR the revenue measures.
In my understanding this can be done by expanding field parameters somehow, but it did not work.
("Sales", NAMEOF([Sales measure 2]), 3,"Sales"),
("Revenue", NAMEOF([Revenue measure 2]), 4,"Revenue")
This resultet in a new colum value 4 and i dont know why. Can anyone explain how this works?
Thank you so much!
I think I got your issue now.my last try.check this
You have to bring value4 to fields for the slicer and for the y axis of the graph do below,
I hope this works
regards,
9 Replies
- PBIViz_2024Advocate I
Hi,
I believe you have manually written this to generate a field parameter.Here is how you should do it.
Go to Modeling Tab->New Parameter->Field
Then do as below screenshot,
Then Click on "Create" Button.Your field parameter will be available to use and it will automatically generate the slicer also.
correct syntax for the field parameter is shown below.But do not write it manually instead follow the above steps.
- H3nningHelper V
But this will only make it possible to switch between the 2 sales measures. I want to display BOTH sales measures or BOTH revenue measures in a stacked bar chart for example.
- PBIViz_2024Advocate I
Hi,
For that first create the Field parameter with all 4 measures as explained before.
That will result a slicer looks like below,
and then in slicer settings disable mutli selction with Ctrl
you will be able to easily select whatever the measure/measures you want.