Forum Discussion

cg1980's avatar
cg1980
Helper I
5 years ago
Solved

Drillthough and filtering issue

Hi Guys, This can be silly.. but I didnt find a way.. attached a sample file with my problem,* I have Millons of records , this is  an example to illustrate what i want to achive ) PBIX file   My...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi cg1980 

    Drillthrough function will only show you the value which contains product ID= 10 only without showing all product ID in the same Order Id which contains product ID =10.

    You can achieve your goal by measure and Sync slicers in Vew Tab.

    Firstly build a new table named Table2 (is not related to Table1):

     

    Table 2 = SUMMARIZE('Table','Table'[Order ID],'Table'[Product ID])

     

    Then update your measure and build a new measure.

     

    # of Orders elements with prod. unit price 0 = 
    VAR _Count = CALCULATE(COUNT('Table'[Order ID]),'Table'[Unit Price]=0)
    VAR _OrderID =
        SUMMARIZE (
            FILTER ( ALL ( 'Table' ), 'Table'[Unit Price]=0 ),
            'Table'[Order ID]
        )
    Return
    IF(MAX('Table 2'[Order ID]) in _OrderID,_Count,BLANK())
    Measure = 
    VAR _Sel =
        SELECTEDVALUE ( 'Table 2'[Product ID] )
    VAR _OrderID =
        SUMMARIZE (
            FILTER ( ALL ( 'Table' ), 'Table'[Product ID] = _Sel ),
            'Table'[Order ID]
        )
    RETURN
        IF (
            ISFILTERED ( 'Table 2'[Product ID] ),
            IF ( MAX ( 'Table'[Order ID] ) IN _OrderID, 1, 0 ),
            1
        )

     

    Drag measure into filter field and set to show items when the value =1 as below.

    Select product ID =10 in Visual 2 and see the result in the same page.

    If you want to filter on other pages you need to build a slicer by product ID in Table2 and drag measure(# of Orders elements with prod. unit price 0 ) in filter field and set to show items is not blank.

    Then use sync slicer function, select the pages you want this slicer impact.(You need to add measures in visuals' filter field in other pages as well)

    You can download the pbix file from this link: Drillthough and filtering issue

     

    Best Regards,

    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.