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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
katrine_d2o
Helper I
Helper I

ALL and ALLSELECTED not returning the total

Hi,

I am trying to calculate a simple percentage of total sales per category. For example bottle of red wine of all wine.

 

I have tried ALL dax and ALLSELECTED dax:

ALLSELECTED RevPrProdCategory =
CALCULATE(
    [NetRevenue],
ALLSELECTED(POSItemDetails[ProductCategory])
)
 But, I always get the revenue per item. I am working with a live dataset, not sure if that matters. I cannot seem to find a lot of information about working with live data.
katrine_d2o_0-1685690976494.png

Am I doing something wrong? Any suggestions?

 
1 ACCEPTED SOLUTION
AntrikshSharma
Super User
Super User

@katrine_d2o Description column is sorted by ProductKey or any other column? If yes, then include that column as well in the ALL/ALLSELECTED.

View solution in original post

3 REPLIES 3
katrine_d2o
Helper I
Helper I

Thank you @AntrikshSharma, for responding. But it still does not work. This is from a restaurant where you have product categories. The article (description) belongs to a product categor and a pos category. There is no particular sort order.

As an example, what I want to find out:
The chardonnays sold is X percent of all white wines. For this I need to use the total of white wine, being a POS Category.

Hi again, @AntrikshSharma 

I think I figured it out - I was looking at it wrong. I needed to use description instead of category in the formula. In essence I was looking for the total of all the items/description in a category.

Thanks again

AntrikshSharma
Super User
Super User

@katrine_d2o Description column is sorted by ProductKey or any other column? If yes, then include that column as well in the ALL/ALLSELECTED.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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