+ Reply to Thread
Results 1 to 6 of 6

DAX TOPN concatenate

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

    DAX TOPN concatenate

    Hi,
    Can someone explain or point me in the direction of some clear information on how TOPN sorts things,

    I've been trying to use it with Concatenatex to bring back for example the top selling item in the filter context in my example month,

    it's not jus that my resultes are wrong I've put thng into DAX studio to try and figure it out and still cant see where some of the values are coming from.

    So just to return to top value in the example for Jan and Feb to top values are from
    so

    Please Login or Register  to view this content.
    I would expect the table items to be sorted by hte sum of units descending, and then get the top but i don't .

    any help on using this funcion welcome, i've attached the workbook i've been experimenting with to try an
    Attached Files Attached Files
    Last edited by Dicken; 06-12-2023 at 08:56 AM. Reason: Update to attachment

  2. #2
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: DAX TOPN concatenate

    I don't know a lot about DAX.

    If you tell, what is your input and what is your expected result (and what are the rules to reach the expected results),
    may be its easy to develop a formula without DAX. I think so.

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

    Re: DAX TOPN concatenate

    Not quite sure what you mean by input, I attached the workbook with the examples,
    from that I wanted to use topn to get the highest unit for each month in the pivot and then the Item or custmer asscociated with that figure.
    so see sheet 2 Jan = D ,14 and Feb = C 23 , but these are not the what is returned by the measures I've used, so they are wrong,
    but it's difficult to re write them as I can't figure out what they are returning.

    rd

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,990

    Re: DAX TOPN concatenate

    You're filtering for the item with the top units, then calculating the sum of the units for that item. So for Jan for example, you find the largest units value, which is for item D, then you calculate the total units for item D in January.
    Everyone who confuses correlation and causation ends up dead.

  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: DAX TOPN concatenate

    Please add manualy the expected results in your sheet.

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

    Re: DAX TOPN concatenate

    Using studio,
    Please Login or Register  to view this content.
    so ;
    Please Login or Register  to view this content.
    seem to be giving the correct result, and then

    Please Login or Register  to view this content.
    and then used this to return the totals for the above, I've reattached workbook, thanks for the help.

    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 TOPN function
    By Dicken in forum Office 365
    Replies: 7
    Last Post: 12-02-2022, 07:02 PM
  2. Replies: 1
    Last Post: 01-09-2021, 06:14 AM
  3. [SOLVED] Vlookup and Concatenate or INDEX/MATCH and Concatenate
    By naumanxkhan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-03-2020, 09:44 PM
  4. Auto concatenate and reverse concatenate & Remove duplicates .
    By Andy308 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2016, 12:38 PM
  5. Concatenate with Double Info in Concatenate Cell
    By MRoz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-10-2015, 02:07 PM
  6. Replies: 2
    Last Post: 04-12-2010, 12:35 PM
  7. [SOLVED] I know how to concatenate ,can one de-concatenate to split date?
    By QUICK BOOKS PROBLEM- in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-26-2005, 01:05 PM

Tags for this Thread

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