Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
till2718281828
Regular Visitor

How to calculate a measure using a drillthrough filter

Hi everybody,

Pretty much often I need to calculate a measure presented below:

 

Drillthrough filters:

'Attribute 2' is "Xxxxx"

 

Attribute 1Attribute 2ValueMeasure
AaaZ100100
AaaXxxxx1010
BbbZ100 
BbbY20 
CccZ100 
CccY10 
DddZ100100
DddXxxxx2020

 

So we need to:

  1. find out the elements of 'Attribute 1' for which 'Attribute 2' is not NULL;
  2. calculate the measure that sum 'Value' for such elements of 'Attribute 1'.

Can someone help with that

Thanks

1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee


@till2718281828 wrote:

Hi everybody,

Pretty much often I need to calculate a measure presented below:

 

Drillthrough filters:

'Attribute 2' is "Xxxxx"

 

Attribute 1 Attribute 2 Value Measure
Aaa Z 100 100
Aaa Xxxxx 10 10
Bbb Z 100  
Bbb Y 20  
Ccc Z 100  
Ccc Y 10  
Ddd Z 100 100
Ddd Xxxxx 20 20

 

So we need to:

  1. find out the elements of 'Attribute 1' for which 'Attribute 2' is not NULL;
  2. calculate the measure that sum 'Value' for such elements of 'Attribute 1'.

Can someone help with that

Thanks


@till2718281828

As far as I know, the attributes 2 which is not in the drillthrough filter won't present the the drill through page. You can only get a total sum of the attribute 1 instead of individual sums.

 

Measure =
CALCULATE (
    SUM ( yourTable[Value] ),
    ALLEXCEPT ( yourTable, yourTable[Attribute 1] )
)

Capture.PNG

View solution in original post

1 REPLY 1
Eric_Zhang
Employee
Employee


@till2718281828 wrote:

Hi everybody,

Pretty much often I need to calculate a measure presented below:

 

Drillthrough filters:

'Attribute 2' is "Xxxxx"

 

Attribute 1 Attribute 2 Value Measure
Aaa Z 100 100
Aaa Xxxxx 10 10
Bbb Z 100  
Bbb Y 20  
Ccc Z 100  
Ccc Y 10  
Ddd Z 100 100
Ddd Xxxxx 20 20

 

So we need to:

  1. find out the elements of 'Attribute 1' for which 'Attribute 2' is not NULL;
  2. calculate the measure that sum 'Value' for such elements of 'Attribute 1'.

Can someone help with that

Thanks


@till2718281828

As far as I know, the attributes 2 which is not in the drillthrough filter won't present the the drill through page. You can only get a total sum of the attribute 1 instead of individual sums.

 

Measure =
CALCULATE (
    SUM ( yourTable[Value] ),
    ALLEXCEPT ( yourTable, yourTable[Attribute 1] )
)

Capture.PNG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.