Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Get largest value from a SUMMARIZE table by id

Hi everyone, 

 

I'm a newbie when it comes to DAX, I'm using PowerPivot in Excel 2013,  I have a table Bugs that have all the historical data for bugs opened in our company (component, status, updated_date, rev, etc) for every change done to the bug it is recorded with a consecutive revision # 1...n.

 

I've been struggling trying to the get the largest rev value from a given table that I'm getting using the SUMMARIZE function as in a measure as follows so I can later SUM/SUMX the Is_Open column,  therefore, HOW can I get the largest value from the Summarize_Rev column for every id based on a date selected by the user means by a slicer in GUI?   

 

ie for id 2204835797  it would be 4.

 

NOTE: DATE(2018,08,03)   is actually dinamic based in a measure I built Date_Selected:=MIN(dtDates[DateToSelect])

 

 

 SUMMARIZE 
 (
            FILTER (Bugs,Bugs[updated_date]< DATE(2018,08,03))
            ,Bugs[id]
            ,Bugs[Is_Open]  
            ,"Summarized_Rev",MAX ( Bugs[rev] )
  ) 

 

idIs_OpenSummarize_Rev
12010001801021
12010001354025
1201000122609
1201000120506
1201000115113
12010001151010
220483579703
220483579714
220473220219
2204732202012

 

 

Please let me know if you need further details.

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

If you want to calculate the Max Summarize_Rev per id, you could try with the formula below.

 

Measure =
CALCULATE (
    MAX ( 'Table1'[Summarize_Rev] ),
    ALLEXCEPT ( Table1, 'Table1'[id] )
)

Here is the result output.

 

max rev.PNG

 

If you still need help, please share your data sample and your desired output so that we could help further on it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

If you want to calculate the Max Summarize_Rev per id, you could try with the formula below.

 

Measure =
CALCULATE (
    MAX ( 'Table1'[Summarize_Rev] ),
    ALLEXCEPT ( Table1, 'Table1'[id] )
)

Here is the result output.

 

max rev.PNG

 

If you still need help, please share your data sample and your desired output so that we could help further on it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks Cherry! 

It was not exactly what I needed surely because I wasn't clear enough :), however I was able to handle the final result I needed.

 

Again,  BIG thanks! 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.