Forum Discussion

msantillan's avatar
msantillan
Helper II
6 years ago

Conditonal filter from two different charts

Hi, is there a way to filter the matrix based on what is being selected(clicked) by the user

 

CHART1 = leftmost barchart

CHART2 = right upper barchart

CHART3 = right lower barchart

 

Current Scenario:

- User clicks on any bar from chart1, chart3 gets filtered by current value(hours)

 

Desired Scenario:

- User clicks on any bar from chart1, chart3 gets filtered by value(names)

- User clicks on any bar from chart2, chart3 gets filtered by value(hours)

 

I made a calculated column:

 

Selected Column =
Var Result = CALCULATE(FIRSTNONBLANK('General'[Adjusted App],1))
Return
switch(True(),
CALCULATE(DISTINCTCOUNT('Investments Application Table'[Category]))=1,Result,
CALCULATE(DISTINCTCOUNT('Adjustments Table'[Adjustments ID]))=1,FIRSTNONBLANK(General[Hours Spent],1)
)

 

However, something seems to be wrong and it returns an error of: Expressions that yield variant data-type cannot be used to define calculated columns.

 

To summarize what I need: any bar from chart 1 is clicked, chart3 matrix values = names. any bar from chart2 is clicked,

chart3 matrix values = hours.

I hope someone can help. Thank you in advance.

3 Replies

    • msantillan's avatar
      msantillan
      Helper II

      Hi, disregarding the error. The code still doesn't work as what I intend it to.

       

      Thanks.

  • Icey's avatar
    Icey
    Community Support

    Hi msantillan ,

     

    If you don't mind, please share me a dummy PBIX file just with necessary data, not real data, and remove sensitive information. I will conduct specific tests.

     

    Best Regards,

    Icey