cancel
Showing results for
Did you mean:
Frequent Visitor

## Context problem (i guess)

Hi guys

im trying to count the products that represent the 80% percent of sales. I need my measure works outside of the report table as a kpi. In the next image you can understand better the situation.

As you can see i got the cumulative sales an the percentage represented by every product. If you check the table, the first 16 products have the 80% of the sales. I made a measure "Number of Top 80% products", that already counts the products!, but when i use the measure as a kpi, outside of the report table (the little rectangle next to the big table) it doesnt work!!. I guess is a context problem but i havent find out the solution. i hope any of you guys could help me:

These are my measures (they are in spanish XD, sorry)

Cumulative sales by product

*[ventas netas] means [total sales]

Number of Top 80% products =
CALCULATE (
FILTER (
[**bleep** totalArti] < [80%sales]
)
)

My best regards

Juan Diego

1 ACCEPTED SOLUTION

Accepted Solutions
Frequent Visitor

## Re: Context problem (i guess)

Thank you for your help. The problem was in the filter, the content is ok, i changed the measure for avoid the values equal to zero.

Number of Top 80% products =
CALCULATE (
FILTER (
AND([**bleep** totalArti] < [80%sales],[**bleep** totalArti] >0),
)
)

Again, thank you for your time.

regards

Juan Diego

2 REPLIES 2
Community Support

## Re: Context problem (i guess)

Try using ALLSELECTED Function instead of ALL Function in the cumulative measure as well.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor

## Re: Context problem (i guess)

Thank you for your help. The problem was in the filter, the content is ok, i changed the measure for avoid the values equal to zero.

Number of Top 80% products =
CALCULATE (
FILTER (
AND([**bleep** totalArti] < [80%sales],[**bleep** totalArti] >0),
)
)

Again, thank you for your time.

regards

Juan Diego

Announcements

#### ‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

#### Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

#### April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

#### MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors