+ Reply to Thread
Results 1 to 2 of 2

TOPN N (DAX Formulas) Issues

  1. #1
    Registered User
    Join Date
    06-13-2013
    Location
    Brazil
    MS-Off Ver
    Excel 2007
    Posts
    29

    TOPN N (DAX Formulas) Issues

    I want to have a column or a line with TOP N (lets say 3) products sold in a period, working along the data calendar hierarchy. Like, what were the top 3 products sold per year, quarter, month, day according pivot table data hierarchy.

    Files and prints attached

    Please refer to pivot table in tab Pivot Table (6) to check the measure I tried to use.

    Problems Im facing:

    1 I'v tried a bunch of top n tutorials and none of them work. Some use summarize, sumx, concatenatex… Question: I cant just use straight ahead TOP N like a function to have a column or line in the pivot table the 3 most sold products? I have to use some function to initialize the TOP N?

    2 I did the relationship between tblProducts and tblOrders but the tblProducts does not show on the fields to select into the pivot table. Why?

    3 =sumx(TOPN(3, SUMMARIZE(tblOrders, Calendar'[Date],topn sales,sum(tblOrders[Qty])),[topn sales],DESC),[topn sales])

    tried this formula, but function sum [sum(tblOrders[Qty])] only accepts a table column and not another measure (used [Qty] so it could work).

    Id like to use the top 3 from Total Revenue X, how can I do that?

    Summarizing everything, how can I have the Top 3 products sold by period?

    cw4776.png

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,755

    Re: TOPN N (DAX Formulas) Issues

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so. Cross-posts are allowed but you must provide a link to your posts on other sites.

    Please see Forum Rule #7 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    (Note: this requirement is not optional. No help to be offered until you provide a link or, for members with fewer than 10 posts, a comment telling us where else you have posted this query.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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 return top N values in descending order
    By Dicken in forum Office 365
    Replies: 10
    Last Post: 06-20-2023, 11:57 AM
  2. DAX TOPN concatenate
    By Dicken in forum Office 365
    Replies: 5
    Last Post: 06-12-2023, 08:55 AM
  3. DAX TOPN function
    By Dicken in forum Office 365
    Replies: 7
    Last Post: 12-02-2022, 07:02 PM
  4. Replies: 1
    Last Post: 01-09-2021, 06:14 AM
  5. [SOLVED] Issues with sum of multiple formulas
    By crimsonmarshal in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-29-2019, 06:45 PM
  6. 2 New Issues Today with Formulas
    By runelady in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-18-2016, 10:09 AM
  7. Some Subtle Issues with Some Formulas
    By Niester Rabbit in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-09-2007, 09:52 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