Forum Discussion
qmartiny
4 years agoHelper III
Calculating overlap between calculated columns
Hello lovely people, Given this table [Account] with calculated columns [SPx]. Account Account SP1 SP2 SP3 AAA 1 1 BBB 1 1 CCC 1 I have created a slicer c...
qmartiny
4 years agoHelper III
Here's where I am at the moment.. Getting a blank result where it should work in theory?
Overlap =
VAR MaxSelect = MAX('SP Select'[Selection])
VAR MinSelect = MIN('SP Select'[Selection])
VAR A = SELECTCOLUMNS(_MAL,"BP",_MAL[BP_ID],"SP",MaxSelect)
VAR B = SELECTCOLUMNS(_MAL,"BP",_MAL[BP_ID],"SP",MinSelect)
RETURN
COUNTROWS(INTERSECT(A,B))
lbendlin
4 years agoSuper User
your first two variables get you a scalar value, not a column. You can still do an intersect but it will only test if these scalar values match.
If you cannot hard code the column names then you need to use measures. But you mentioned that these are calculated columns in the first place. Maybe explain the setup in more detail.
- qmartiny4 years agoHelper III
Hm. I am stuck since my slicer doesnt have the same name as my column header anyway..
I'll try using a UNION table to unpivot the data see if that's easier.
Thanks