Forum Discussion
rahul49
3 years agoNew Member
Change table based on slicer
Hi,
I want to make my X-axis values dynamic for that i have a slicer based on which i select a table.
once i select a table from slicer i want to select column from that table.
I tried beow 2 DAX but it did not help.
DAX 1
SWITCH(
SELECTEDVALUE(Customer[Customer]),
"A", VALUES(Sheet1[Category]),//LOOKUPVALUE(Sheet1[Category], Sheet1[ID], 1),
"B", VALUES(Sheet10[Category]),//LOOKUPVALUE(Sheet10[Category], Sheet10[ID], 1),
"C", VALUES(Sheet9[Category]),//LOOKUPVALUE(Sheet9[Category], Sheet9[ID], 1),
BLANK()
)
DAX2
VAR SelectedTable =
SELECTEDVALUE(Customer[Customer])
RETURN
IF(
SelectedTable = "A",
SELECTCOLUMNS(Sheet1, "Values", Sheet1[Category]),
IF(
SelectedTable = "B",
SELECTCOLUMNS(Sheet2, "Values", Sheet2[Category]),
BLANK()
)
)
1 Reply
- TomMartensSuper User