currentgroup
3 TopicsIndex Column Groupby() and currentgroup()
Hi all, i have a table with the columns ID and Category. The goal is to create a new table that lists the IDs, and an index of the number of categorys an ID had in its lifetime. Example: Data Table ID / Category 00001 / SWF Info 00001 / Response FOMA 00001 / Creditreform 00001 / Legal IKU 00001 / Bankcrupcy Desiered Result should be: ID / Index 00001 / 5 I tried thisSolved1KViews0likes4CommentsApply filter on CURRENTGROUP
Hi I am trying to calculate the difference between the last and previous observations for each ID. In the dataset, I have multiple observations for each ID over time. As a first step, I want to create a new table with the last and previous dates. I m using GROUPBY, but I cannot apply any filter to CURRENTGROUP. What would be a better approach to the problem? Thanks NewTable = GROUPBY( table,table[ID], "LastDate",MAXX(CURRENTGROUP(),table[DATE]), "PreviousDate", MAXX(FILTER(CURRENTGROUP(), table[DATE] < MAXX(CURRENTGROUP(),table[DATE]),table[DATE] ) ))Solved2.6KViews0likes2CommentsGROUPBY DAX to return a table with a sum of column that group by 2 other columns from another table
Hello wonderful community, I will try my best to be brief in this request. For simplicity, I have a table below (the table name is WorkCentre220) that I have filtered Week Number = 38 and Year = 2022. The total sum of Required Hours under these filters is 98.698 (98.70 round off) Challenge: I want to return a new table using GROUPBY function that group [Week Number] and [Year] into a single row and sum the total value of column [Required Hours] into One Row. I have worked out the DAX formula to return the table but can't quite figure out how to finish this: Required_Hours_By_Week_And_Year = GROUPBY( WorkCentre220, WorkCentre220[5. Week Number], WorkCentre220[6. Year], "Total Required Hours by Week and Year", ) Expected Results: Week Number Year Total Required Hours by Week and Year 38 2022 98.70 39 2022 264.90 40 2022 94.90 I'd really appreciate if someone could help me please. Thanks everyone and have a wonderful day!Solved3.9KViews0likes2Comments