cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jnouvel Frequent Visitor
Frequent Visitor

Help with measure and allselectec

Hello,

 

If someone can help me with my report I would be very gratefull!

I'm looking to create a new measure with total of sales in a matrix filtered by context.

 

I start with my matrix filtered  :

 

ID          SALES

A           10

B            20

C           15

D           40

 

what I want is :

 

ID          SALES          TOTAL_OF_SALES

A           10                           85

B           20                           85

C           15                           85

D           40                           85

 

 

Il I create a measure like TOTAL_OF_SALES = CALCULATE(SUM('TABLE1'[SALES]) ; ALLSELECTED('TABLE2'[ID]) )

 

I have this result :

 

ID          SALES          TOTAL_OF_SALES

A           10                           85

X                                          85

B           20                           85

C           15                           85

Z                                          85

D           40                           85

Z4                                        85

Z6                                        85

 

Every ID even those which are out of context appear... someidea to avoid this? 

 

Thanks.

 

Jerome

1 ACCEPTED SOLUTION

Accepted Solutions
jnouvel Frequent Visitor
Frequent Visitor

Re: Help with measure and allselectec

Hello guys,

 

I'm back with a solution...

 

Just need to switch my measure to 

TOTAL_OF_SALES = SUMX(VALUES('TABLE1'[ID2];CALCULATE(SUM('TABLE1'[SALES]) ; ALLSELECTED('TABLE2'[ID]) )

 

And it works perfectly!

 

sorry for the disturbance.

 

 

View solution in original post

1 REPLY 1
jnouvel Frequent Visitor
Frequent Visitor

Re: Help with measure and allselectec

Hello guys,

 

I'm back with a solution...

 

Just need to switch my measure to 

TOTAL_OF_SALES = SUMX(VALUES('TABLE1'[ID2];CALCULATE(SUM('TABLE1'[SALES]) ; ALLSELECTED('TABLE2'[ID]) )

 

And it works perfectly!

 

sorry for the disturbance.

 

 

View solution in original post

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors