+ Reply to Thread
Results 1 to 5 of 5

DAX Calculated column ALLEXCEPT v ALL / Values;

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    460

    DAX Calculated column ALLEXCEPT v ALL / Values;

    Workbook included.

    Hi,

    I have a measure ;

    Total Item:=CALCULATE([Total],ALL(Table1),VALUES(Table1[Item]) )

    which give a total for items, I would like to replicate this as a calculated column using ALL and Values.

    I have got it to work uisng ALLEXCEPT ;
    Please Login or Register  to view this content.
    but I cannot get ALL / VALUES to work ; I have tried ;
    Please Login or Register  to view this content.
    which I thought would work the same, but I just get an overall total and I've also tried; ;

    Please Login or Register  to view this content.
    and I'm not quite sure how this in calculating?

    How can I use ALL and VALUES to get the result I want?

    Richard.
    Attached Files Attached Files
    Last edited by Dicken; 09-15-2023 at 02:15 PM. Reason: Re write to make clearer

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent SAC
    Posts
    8,308

    Re: DAX Calculated column ALLEXCEPT v ALL / Values;

    I can't imagine why you would, but it would need to be:

    =CALCULATE([Total],ALL(Table1[Date]),ALL(Table1[Units]),VALUES(Table1[Item]) )

    in order to override the row context filter on the Units column - which is why you get the answers you do with your CALCULATE([Total],ALL(Table1[Date]),VALUES(Table1[Item]) ) version.
    Rory

  3. #3
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    460

    Re: DAX Calculated column ALLEXCEPT v ALL / Values;

    Thanks, what about where I used ALL Table ;

    Please Login or Register  to view this content.
    Isn't that removing the filter context form the Date and Units ? but seem to ignore the VALUES, I can't find much/ anything on
    the difference, if any, between ALL / VALUES in a Calculated column and measure.

    Richard.

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent SAC
    Posts
    8,308

    Re: DAX Calculated column ALLEXCEPT v ALL / Values;

    VALUES is an iterator and in the row context of a calculated column, it returns all the Item values for each row of the table, so it actually has no effect when combined with your ALL(Table1).

  5. #5
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    460

    Re: DAX Calculated column ALLEXCEPT v ALL / Values;

    Thank you,

    RD

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. DAX ALLEXCEPT vs ALL & VALUES
    By Dicken in forum Office 365
    Replies: 0
    Last Post: 03-31-2023, 09:37 AM
  2. DAX ALLEXCEPT versus ALL & VALUES in Power Pivot
    By Dicken in forum Office 365
    Replies: 4
    Last Post: 08-04-2022, 09:17 AM
  3. Replies: 0
    Last Post: 07-10-2022, 11:34 AM
  4. need a column to show no values until calculated
    By RedRay56 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-03-2020, 03:15 PM
  5. [SOLVED] Pivot Calculated field using values of a Column
    By jomili in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-27-2017, 10:17 AM
  6. How to rank values from a calculated column in a pivot table
    By Algonquin Dude in forum Excel General
    Replies: 0
    Last Post: 11-30-2011, 09:50 PM
  7. excel trying to sum a column of calculated values
    By Rowdy in forum Excel General
    Replies: 4
    Last Post: 01-26-2006, 06:55 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1