+ Reply to Thread
Results 1 to 5 of 5

Datamodel Minx over group and period

  1. #1
    Forum Contributor
    Join Date
    10-14-2020
    Location
    Shanghai
    MS-Off Ver
    O365
    Posts
    156

    Datamodel Minx over group and period

    Hi

    I created a measure in my datamodel called [% calc] which is calulation the usage of a raw material vs the stock level of this rawmaterial

    Now I need to calculate the min value of this measure for each assembly (for all sub2items used for the specific assembly)
    Finally I show this in a chart per assembly and week with the row total being the min for each assembly over all weeks.

    The measure I use is this one:
    Please Login or Register  to view this content.
    Its working as I hope to be but I am afraid its not the correct way as the Dax Editor is showing me some Callback ID which is never good as far as I understand

    Is there an expert who can help me to verify this measure?

    If needed, I can prepare a sample data sheet but in the next days

    thanks a lot
    Last edited by hansolu; 06-03-2022 at 01:03 PM. Reason: solved

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Datamodel Minx over group and period

    If needed, I can prepare a sample data sheet but in the next days
    Please be sure to include the expected result(s) so that we will know whether or not our proposed formulas/code work.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Forum Contributor
    Join Date
    10-14-2020
    Location
    Shanghai
    MS-Off Ver
    O365
    Posts
    156

    Re: Datamodel Minx over group and period

    Hi,

    attached the file with the desired output below the pivot table

    I use a measuer to calculate Stock Case. This stock case is then used in the % calculation.

    Issue in Version1 of my % measure is the row total of the Subtotals (Sub1Item level) are wrong. (always 4%)
    Please Login or Register  to view this content.
    Issue in Version2 is the performance in my model and that the values itself are wrong but the totals (column and row) are correct (the min. values of the wrong initial values)

    Please Login or Register  to view this content.
    Sub2Item Level should be same as result as the Stock case.

    Its a bit different behaviour than in my original file. If I figure out how to solve this example, I am able to solve my original file I guess.


    thanks for any help
    Attached Files Attached Files

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Datamodel Minx over group and period

    Please try

    =Var t =ADDCOLUMNS(CROSSJOIN( VALUES(dSubItem2[Sub2Item]),VALUES(dCalendar[Week])),"St",[Stock Case])
    return MINX(t,[st])
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    10-14-2020
    Location
    Shanghai
    MS-Off Ver
    O365
    Posts
    156

    Re: Datamodel Minx over group and period

    Hi, work like a charm and is also faster than before. I cant say thanks enough

    Crossjoin in the measure is new for me, I guess there are some other cases where I can use it. I will have a deeper look into\
    thanks a lot

+ 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 Minx issue for Grandtotal and Performance problem
    By hansolu in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-24-2022, 08:29 AM
  2. Relationship issues in Datamodel and DAX Measure
    By hansolu in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 03-14-2022, 07:06 AM
  3. [SOLVED] Averagex measure in datamodel
    By hansolu in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 09-13-2021, 01:12 AM
  4. [SOLVED] CubeValue Direct from DataModel
    By ptmuldoon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-28-2020, 02:04 PM
  5. [SOLVED] Group by time period and by day
    By BRISBANEBOB in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 02-09-2020, 08:15 PM
  6. UK Tax Period April 2016 to March 2017 Sort Group Pivot table
    By thorrrr in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-17-2018, 01:32 PM
  7. [SOLVED] Extracting dates of group of occurrences over year period
    By Cygnet in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-14-2014, 07:06 AM

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