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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.