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
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
Community Champion
Community Champion

@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
Community Champion
Community Champion

@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
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.

Top Solution Authors