Forum Discussion

chhu's avatar
chhu
Advocate II
9 years ago

Use chart as slicer

I know that currently it is not possible to use a chart as a slicer (in that making a selection in another visual resets the first visual).

 

But, is there any way to use a variable to store the selected value in a new table? That can then be joined to another table from which to create the secondary visual?

 

Something like this (although this doesn't work and presents a blank table). 

  

NewTable = 
	VAR MyValue =
	TOPN(1, values(table[field])) 
	RETURN
	CALCULATETABLE(table,table[field]=MyValue)

 

2 Replies

  • v-ljerr-msft's avatar
    v-ljerr-msft
    Microsoft Employee

    Hi chhu,


    But, is there any way to use a variable to store the selected value in a new table? That can then be joined to another table from which to create the secondary visual?  

    I don't think it is possible to use a variable to store the previously selected value in a chart. Because VAR Function (DAX) is always evaluated in the current context, however, when we select a new chart, the context just changed, and the value of variable will be re-evaluated in the new context.

     

    So I would suggest you to use Visual Level Filter in this scenario. Please check if it could help.

     

    In addition, could you submit your requirement(use chart as real slicer) on Power BI Ideas and vote it up to improve Power BI and make it better.:smileyhappy:

     

    Regards