Forum Discussion
Help with a dynamic bridge please
- 3 years ago
Anonymous OK, create 2 disconnected tables (no relationships). Let's say you didn't rename the Attribute and Value columns after unpivoting, create your slicer tables like this:
Slicer Table 1 = DISTINCT('Table'[Attribute])Slicer Table 2 = DISTINCT('Table'[Attribute])Now, create a measure like this:
Measure = VAR __Month1 = SELECTEDVALUE('Slicer Table 1',[Attribute]) VAR __Month2 = SELECTEDVALUE('Slicer Table 2',[Attribute]) VAR __Table1 = DISTINCT(SELECTCOLUMNS(FILTER('Table',[Attribute] = __Month1 && [Value] = "Open"),"__Ref",[Ref])) VAR __Table2 = DISTINCT(SELECTCOLUMNS(FILTER('Table',[Attribute] = __Month2 && [Value] = "Closed"),"__Ref",[Ref])) RETURN COUNTROWS(INTERSECT(__Table1, __Table2))
Anonymous Unpivot your Status columns in Power Query Editor. Would also be helpful to have an actual date column or at least a month number column.
Thank you Greg_Deckler .
Did that. What should be my next course of action?
- Greg_Deckler3 years agoCommunity Champion
Anonymous OK, create 2 disconnected tables (no relationships). Let's say you didn't rename the Attribute and Value columns after unpivoting, create your slicer tables like this:
Slicer Table 1 = DISTINCT('Table'[Attribute])Slicer Table 2 = DISTINCT('Table'[Attribute])Now, create a measure like this:
Measure = VAR __Month1 = SELECTEDVALUE('Slicer Table 1',[Attribute]) VAR __Month2 = SELECTEDVALUE('Slicer Table 2',[Attribute]) VAR __Table1 = DISTINCT(SELECTCOLUMNS(FILTER('Table',[Attribute] = __Month1 && [Value] = "Open"),"__Ref",[Ref])) VAR __Table2 = DISTINCT(SELECTCOLUMNS(FILTER('Table',[Attribute] = __Month2 && [Value] = "Closed"),"__Ref",[Ref])) RETURN COUNTROWS(INTERSECT(__Table1, __Table2))- Anonymous3 years agoNot applicable
ok, this looks extremely promising. Let me try and get back on this. Greg_Deckler , so nice and helpful of you.
- Anonymous3 years agoNot applicable
Greg_Deckler I'm really sorry coz these are absolutely noob questions.
I renamed Attribute to Month
I renamed Value to Status
Created 2 identical slicer tables as you instructed.
Created Var 1 and Var 2 successfully as you instructed.
What are the 'Ref' and ['Ref] here?
VAR __Table1 = DISTINCT(SELECTCOLUMNS(FILTER('Table',[Attribute] = __Month1 && [Value] = "Open"),"__Ref",[Ref]))and 'Table' here is my main Data Table, right?
Can't appreciate your help enough!