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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
pprakash
Helper I
Helper I

Getting the calculated Max value of each group.

Hi,

 

I am working on a table and need data according to count of req_event_id, group by req_id and max created_date.

 

i did some calculation but unable to get only max value. 

 

ApprovedByHod = CALCULATE(count('eta requisition_life_cycles'[id]),'eta requisition_life_cycles'[req_event_id]=2 )

 

 

 

 

IDreq_idreq_event_idcreated_byupdated_bycreated_dateupdated_date
22099150450407-10-2018 20:0607-10-2018 20:06
221100159659608-10-2018 11:3508-10-2018 11:35
25710021108-10-2018 20:2108-10-2018 20:21
3231004323209-10-2018 11:2109-10-2018 11:21
222101159659608-10-2018 11:4008-10-2018 11:40
25610121108-10-2018 20:2108-10-2018 20:21
3201013323209-10-2018 11:2009-10-2018 11:20
3211015323209-10-2018 11:2009-10-2018 11:20
223102159659608-10-2018 11:4708-10-2018 11:47
25510221108-10-2018 20:2108-10-2018 20:21
3191024323209-10-2018 11:2009-10-2018 11:20
224103141941908-10-2018 12:2508-10-2018 12:25
341103242442409-10-2018 16:2909-10-2018 16:29
3531033323209-10-2018 17:2009-10-2018 17:20
369103560660610-10-2018 10:2010-10-2018 10:20

 

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@pprakash,

 

You may add a calculated table first.

Table =
SUMMARIZE (
    Table1,
    Table1[req_id],
    "req_event_id", MAXX ( TOPN ( 1, Table1, Table1[updated_date], DESC ), Table1[req_event_id] )
)
Community Support Team _ Sam Zha
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

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@pprakash,

 

You may add a calculated table first.

Table =
SUMMARIZE (
    Table1,
    Table1[req_id],
    "req_event_id", MAXX ( TOPN ( 1, Table1, Table1[updated_date], DESC ), Table1[req_event_id] )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
smpa01
Super User
Super User

 Is this what you are looking for  @pprakash

 

Capture.JPG

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

hey sorry i could'nt make you understand. i need total count of req_event ids based upon( last created at and group by req_id)

 

something like last req_event id based upon last updated according to grouping of req_id

 

req_id     Req_event id      Last updated

100         1                          .............

101         2                          .............

102        2                         ............

103      3                          ............

 

then 

total count of req_event_id ie total count of 1 then total count of 2 and total count of 3. 

 

please excuse my english. it will be very helpful if you suggest any solution.

hey @smpa01 sorry i could'nt make you understand. i need total count of req_event ids based upon( last created at and group by req_id)

 

something like last req_event id based upon last updated according to grouping of req_id

 

req_id     Req_event id      Last updated

100         1                          .............

101         2                          .............

102        2                         ............

103      3                          ............

 

then 

total count of req_event_id ie total count of 1 then total count of 2 and total count of 3. 

 

please excuse my english. it will be very helpful if you suggest any solution.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.