Forum Discussion
Anshenterprices
Helper IV
5 years agodynamically change the values based on the slicer selection
Hi Team, source data Universityid Ranks CollegeName Category SubCategory A1 1 Cape Town Oxford Andrews B2 2 Pretoria Oxford Harvard A2 3 Witwatersrand Stanford Calte...
- Anonymous5 years ago
Here is one way
The fact table is like your sample, and the dim table as below, NO Relationship between them, Slicer is using dim table
Result = VAR SelectedU = SELECTEDVALUE(dimU[Universityid]) VAR CurU=MAX(SourceTable[Universityid]) VAR T1=FILTER(ALL(SourceTable),SourceTable[Universityid]=SelectedU) VAR CurSub = MAXX(T1,SourceTable[SubCategory]) VAR CurCat=MAXX(T1,SourceTable[Category]) RETURN SWITCH(TRUE(), CurU=SelectedU,MAX(SourceTable[CollegeName]), CurSub in VALUES(SourceTable[SubCategory]),CurSub, CurCat in VALUES(SourceTable[Category]),CurCat, "General")
Anonymous
5 years agoNot applicable
Here is one way
The fact table is like your sample, and the dim table as below, NO Relationship between them, Slicer is using dim table
Result =
VAR SelectedU = SELECTEDVALUE(dimU[Universityid])
VAR CurU=MAX(SourceTable[Universityid])
VAR T1=FILTER(ALL(SourceTable),SourceTable[Universityid]=SelectedU)
VAR CurSub = MAXX(T1,SourceTable[SubCategory])
VAR CurCat=MAXX(T1,SourceTable[Category])
RETURN
SWITCH(TRUE(),
CurU=SelectedU,MAX(SourceTable[CollegeName]),
CurSub in VALUES(SourceTable[SubCategory]),CurSub,
CurCat in VALUES(SourceTable[Category]),CurCat,
"General")