Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Interaction between Clustered Column Chat and Tables on report

I have a Clustered Column visual in which I am using 3 measures and NOTHING on Axis. 

 

3 Measures are 

 

Count of Orders 
Count of Sales 
Count of Returns

 

Based on the Amout selected on the slicer I am counting. 

List Amt is my slicer 


My calculation is almost same for these 3 measures. and my DAX is 

 

Orders Count Dynamic =
VAR MinValue = MIN ( 'Fact - Orders'[ListAmt] )
VAR MaxValue = MAX ( 'Fact - Orders'[ListAmt] )

 

RETURN

 

CALCULATE (
         DISTINCTCOUNT ('Fact - Orders'[OrderNum] ),
         ALL ( 'Fact - Orders'[OrderNum] ),
         'Fact - Orders'[Order Amt] >= MinValue,
         'Fact - Orders'[Order Amt] <= MaxValue
)

 

When I select any one of these 3 measure, my data should filter accordingly. 

 

Example: when I select the bar on the graph "Count of Orders" lets say the value is "51"
My table on the same report should filter the data to ONLY those 51 orders out of 3K orders listed on the table.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Here is the sample PBIX file that I created to demo the same for my request.

     

    • Ashish_Mathur's avatar
      Ashish_Mathur
      Icon for Super User rankSuper User

      Hi,

       

      IN your Table visual, drag the three measures to the Visual Level Filter section.  If you only want to see those where No Of sales is 1, then apply that critera.  In the screenshot below, you will see the result becomes 76.  I also modified your measure to:

       

      No Of Sales =
      VAR Min_Value = MIN(Orders[Max of])
      VAR Max_Value = MAX(Orders[Max of])

      RETURN

      CALCULATE(
          DISTINCTCOUNT(Orders[Product ID]),FILTER(Orders,
          Orders[Sales] >= Min_Value&&
          Orders[Sales] <= Max_Value
      ))

       

      Carry out the same change in the other measures as well.  Now the question is why does this number not tally with 201 in the column chart.  I am not sure of that.  If you can describe your data, business question and expected result in more detail, i may be able to frame your desired solution.