Forum Discussion

Chetanab's avatar
Chetanab
Icon for Microsoft Employee rankMicrosoft Employee
3 years ago

Filter a table based on measure selection from a clustered bar chart

I have a table with 3 columns - ID, CreateDate, ClosedDate.

In visuals, I have a clustered column chart with two measures - Monthyear on x axis, Measures are 1)Created Cases ='table'( distinctcount(ID) )2)Closed Cases = calculate('table'(distinctcount(ID),Userelationship('datetable'[date], 'Table'[ClosedDate]))

 

I also have a table visual with ID, CreateDate,ClosedDate. I want to filter this table by clicking on the individual Created Cases/Closed Cases bars and be able to view the respectives IDs and their details. for example, when I click on the Created Cases bar for the month of March 2023 in the clustered column chart, the table below should show IDs created in march.

 

I am able to achieve this using a slicer that has created cases and closed cases options(Using selectedvalue). I am trying to understand if there's a way to filter the table without using a slicer,i.e directly be able to filter from the column chart

 

2 Replies

  • Chetanab , Not very clear. But check the field parameters and Calculation group

     

    Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9afd
    Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE
    Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f

     

    Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0

     

    Power BI Drill Through when Userelationship is used: https://youtu.be/1BM_WGATrQA

     

    Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: https://youtu.be/fvgcx8QLqZU

     

     

    The information you have provided is not making the problem clear to me. Can you please explain with an example.

    Appreciate your Kudos.

  • Chetanab's avatar
    Chetanab
    Icon for Microsoft Employee rankMicrosoft Employee

    Thanks for getting back. Here's some sample data

     

    IDCreate DateClosed Date
    11/1/20231/31/2023
    21/2/20231/31/2023
    31/3/20232/1/2023
    42/23/20232/27/2023
    52/24/20233/1/2023
    62/4/20233/24/2023
    73/1/20233/24/2023
    83/4/20233/31/2023
    93/3/20233/4/2023

     

    Here are my visuals - 

    Desired solution - Filter below table to created cases when clicked on created cases and closed cases when clicked on closed cases. Currently it filters Created cases correctly because there is an active relationship between table[createddate] and date[date]. But when I selected Closed cases, It should return 2 rows for the  month of Jan as shown below - 

    I am able to achieve the desired soultion using a slicer. Just wondering if there is a way to achieve it without a slicer. 

    For slicer I created a MeasureTable and used selected value