Forum Discussion
Using one Field Parameter for two tables
- Anonymous2 years ago
Hi SpicyRamen22 ,
Based on your description, there is a need to adjust our test data. The data is as follows:
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)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.
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.
(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.
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!
- Anonymous2 years agoNot applicable
Hi SpicyRamen22 ,
Based on your description, there is a need to adjust our test data. The data is as follows:
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)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.