Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SpicyRamen22
Regular Visitor

Using one Field Parameter for two tables

Hi Power BI folks, I was wondering if there is any way to use one field parameter for two graphs but show different results. So for example. I have Item, Dimension and Segment in a field parameter with two tables both using the same field parameter column.

SpicyRamen22_0-1722371819344.png

If only one is selected, for example "Item", then just the first table will show the measures with Items and the second table be blank. If two is selected, for example "Item" and Segment", then the first table will show "Item" and second will show "Segment". 

 

Is there a way to achieve this? Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @SpicyRamen22 ,

 

Based on your description, there is a need to adjust our test data. The data is as follows:

vtangjiemsft_0-1722480728508.png

 

Slicer = DATATABLE ( 
    "Slicer", STRING, "index",INTEGER,
    {
        { "Item",1 },
        { "Dimension",2 },
        { "Seqment",3 }
    }
) 

 

Then we can create measures.

 

Measure 3 = 
var _min=MINX(ALLSELECTED('Slicer'),[Slicer])
var _a=CALCULATE(MAX('Table (2)'[Value]),FILTER(ALLSELECTED('Table (2)'),[id] in VALUES('Table (2)'[id]) && [Attribute]=_min))
RETURN IF(ISFILTERED('Slicer'[Slicer]) = FALSE(),BLANK(),_a)
Measure 4 = 
var _max=MAXX(ALLSELECTED('Slicer'),[Slicer])
var _a= CALCULATE(MAX('Table (2)'[Value]),FILTER(ALLSELECTED('Table (2)'),[id] in VALUES('Table (2)'[id]) && [Attribute]=_max))
RETURN 
IF(COUNTROWS(VALUES('Slicer'[Slicer]))=1  || ISFILTERED('Slicer'[Slicer]) = FALSE(),BLANK(),_a)

 

vtangjiemsft_1-1722480790788.pngvtangjiemsft_2-1722480806355.png

vtangjiemsft_3-1722481280417.png

 

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @SpicyRamen22 ,

 

Thanks @amitchandak  for the quick reply. Please allow me to offer other ideas:

Due to design, the field parameters do not support the functionality you describe at this time. But there is an alternative for your reference:

(1) This is my test data.

vtangjiemsft_0-1722394200770.png

(2) We can create a slicer table.

Slicer = DATATABLE ( 
    "Slicer", STRING, 
    {
        { "Item" },
        { "Dimension" },
        { "Seqment" }
    }
) 

(3) We can create measures.

Measure = IF({"Item"} in VALUES('Slicer'[Slicer]),MAX('Table'[Item]),BLANK())
Measure 2 = IF( {"Seqment"} in VALUES('Slicer'[Slicer]),MAX('Table'[Seqment]),BLANK())

(4) Then the result is as follows.

vtangjiemsft_1-1722394372246.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Thank you so much for the reply. In this case, if someone picks Dimension and Segment, then the second table would be segment but the first table will be blank correct?

 

Any way we can make it so that if someone selects Dimension and Segment, the first table is dimension and second is segment. If someone elects Item and Dimension, the first table is Item and the second is Dimension? 

 

Thank you in advance!

Anonymous
Not applicable

Hi @SpicyRamen22 ,

 

Based on your description, there is a need to adjust our test data. The data is as follows:

vtangjiemsft_0-1722480728508.png

 

Slicer = DATATABLE ( 
    "Slicer", STRING, "index",INTEGER,
    {
        { "Item",1 },
        { "Dimension",2 },
        { "Seqment",3 }
    }
) 

 

Then we can create measures.

 

Measure 3 = 
var _min=MINX(ALLSELECTED('Slicer'),[Slicer])
var _a=CALCULATE(MAX('Table (2)'[Value]),FILTER(ALLSELECTED('Table (2)'),[id] in VALUES('Table (2)'[id]) && [Attribute]=_min))
RETURN IF(ISFILTERED('Slicer'[Slicer]) = FALSE(),BLANK(),_a)
Measure 4 = 
var _max=MAXX(ALLSELECTED('Slicer'),[Slicer])
var _a= CALCULATE(MAX('Table (2)'[Value]),FILTER(ALLSELECTED('Table (2)'),[id] in VALUES('Table (2)'[id]) && [Attribute]=_max))
RETURN 
IF(COUNTROWS(VALUES('Slicer'[Slicer]))=1  || ISFILTERED('Slicer'[Slicer]) = FALSE(),BLANK(),_a)

 

vtangjiemsft_1-1722480790788.pngvtangjiemsft_2-1722480806355.png

vtangjiemsft_3-1722481280417.png

 

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

amitchandak
Super User
Super User

@SpicyRamen22 , Ideally, You should create a common Item, and segment dimensions. Join back with your tables and then create field parameters on dimension tables

 

Power BI- DAX: When I asked you to create common tables: https://youtu.be/a2CrqCA9geM
https://medium.com/@amitchandak/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-soluti...

Power BI- Power Query: When I asked you to create common tables: https://youtu.be/PqfGW6pl1Sw

 

A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.