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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

summarize data

 

hi , i have created a measure MaxID and drag column Requisition_id to get a clustered column visualization. the data came as:

 

MaxIDrequisition_id
199
4100
5101
4102
5103
4104
5105
4106
5107
5108
4109
5110
5111
4112
5113
5114
5115
5116
5117

 

actual data i need is given below:

 

Max IDCount of requisition_id
135
232
314
4129
5229
617
7117

 

 

please help.

1 ACCEPTED SOLUTION

Hi @Anonymous

From you information, MaxID should be the max requisition_event_id per requisition_idCount of requisition_id should be the count of requisition_id per MaxID, right?

 

in my test, [Measure] is the  MaxID, i could also create a calculated column max to replace it, then create another column count for Count of requisition_id.

count = CALCULATE(COUNT(Sheet1[requisition_id,]),ALLEXCEPT(Sheet1,Sheet1[max]))

max = CALCULATE(MAX([requisition_event_id,]),ALLEXCEPT(Sheet1,Sheet1[requisition_id,]))

 

 2.png

Or if you need distintcount, you can use the following formula

distintcount = CALCULATE(DISTINCTCOUNT(Sheet1[requisition_id,]),ALLEXCEPT(Sheet1,Sheet1[max]))

 

Best Regards

Maggie

 

 

 

View solution in original post

12 REPLIES 12
PattemManohar
Community Champion
Community Champion

@Anonymous It will be great if you can share the sample data on which you have created the measure. Also, DAX formula that you used to create the measure.




Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Anonymous
Not applicable

hi @PattemManohar thanks for reply:

 

Dax formula for Max ID is MaxID = MAx('eta requisition_life_cycles'[requisition_event_id]) 

 

and table is 

id event_name, sequencerequired, requires_upload created_atupdated_at
1Created By User | Awaiting HOD's Approval11022-06-2018 7:2422-06-2018 7:26
2Approved by HOD | Awaiting Store's Approval21022-06-2018 7:2522-06-2018 7:26
3Approved by Store | Awaiting Delivery31022-06-2018 7:2610-07-2018 6:48
4Rejected by Store | Requisition Closed30022-06-2018 7:2706-08-2018 15:02
5Delivered | Requisition Closed31010-07-2018 6:4909-08-2018 8:06
6Rejected by HOD | Requisition Closed20006-08-2018 14:1906-08-2018 14:19
7Auto- approved20025-10-2018 16:3725-10-2018 16:37
Anonymous
Not applicable

hi @PattemManohar

 

sorry the sample of table data is given below

 

id,requisition_id,requisition_event_id,upload_link,created_by,updated_by,created_at,updated_at
220991 50450407-10-2018 20:0607-10-2018 20:06
2211001 59659608-10-2018 11:3508-10-2018 11:35
2221011 59659608-10-2018 11:4008-10-2018 11:40
2231021 59659608-10-2018 11:4708-10-2018 11:47
2241031 41941908-10-2018 12:2508-10-2018 12:25
2251041 41941908-10-2018 12:2708-10-2018 12:27
2261051 31031008-10-2018 14:1508-10-2018 14:15
2271061 31031008-10-2018 14:1508-10-2018 14:15
2281071 31031008-10-2018 14:1608-10-2018 14:16
2291081 31031008-10-2018 14:1608-10-2018 14:16
2301091 31031008-10-2018 14:1708-10-2018 14:17
2311101 31031008-10-2018 14:1708-10-2018 14:17
2321111 31031008-10-2018 14:1808-10-2018 14:18
2331121 31031008-10-2018 14:1908-10-2018 14:19
2341131 31031008-10-2018 14:2008-10-2018 14:20
2351141 25125108-10-2018 15:0008-10-2018 15:00
Anonymous
Not applicable

@PattemManohar

 

or you can refer the final data. its more organized. u can see requisition id is repetitive and i am trying to get only max requisiion_event_id from given requisition_id

 

id,requisition_id,requisition_event_id,upload_link,created_by,updated_by,created_at,updated_at
220991 50450407-10-2018 20:0607-10-2018 20:06
2211001 59659608-10-2018 11:3508-10-2018 11:35
2571002 1108-10-2018 20:2108-10-2018 20:21
3231004 323209-10-2018 11:2109-10-2018 11:21
2221011 59659608-10-2018 11:4008-10-2018 11:40
2561012 1108-10-2018 20:2108-10-2018 20:21
3201013 323209-10-2018 11:2009-10-2018 11:20
3211015 323209-10-2018 11:2009-10-2018 11:20
2231021 59659608-10-2018 11:4708-10-2018 11:47
2551022 1108-10-2018 20:2108-10-2018 20:21
3191024 323209-10-2018 11:2009-10-2018 11:20
2241031 41941908-10-2018 12:2508-10-2018 12:25
3411032 42442409-10-2018 16:2909-10-2018 16:29
3531033 323209-10-2018 17:2009-10-2018 17:20
3691035 60660610-10-2018 10:2010-10-2018 10:20
2251041 41941908-10-2018 12:2708-10-2018 12:27
2541042 1108-10-2018 20:2008-10-2018 20:20
3181043 323209-10-2018 11:1909-10-2018 11:19

@AnonymousI am bit confused. Can you post some example how do you want to see the data. I know, you have mentioned in first post. But, it will be great if you post example with the last posted data.

Anonymous
Not applicable

@rocky09 HI

 

my main table is 

d,requisition_id,requisition_event_id,upload_link,created_by,updated_by,created_at,updated_at
220991 50450407-10-2018 20:0607-10-2018 20:06
2211001 59659608-10-2018 11:3508-10-2018 11:35
2571002 1108-10-2018 20:2108-10-2018 20:21
3231004 323209-10-2018 11:2109-10-2018 11:21
2221011 59659608-10-2018 11:4008-10-2018 11:40
2561012 1108-10-2018 20:2108-10-2018 20:21
3201013 323209-10-2018 11:2009-10-2018 11:20
3211015 323209-10-2018 11:2009-10-2018 11:20
2231021 59659608-10-2018 11:4708-10-2018 11:47
2551022 1108-10-2018 20:2108-10-2018 20:21
3191024 323209-10-2018 11:2009-10-2018 11:20
2241031 41941908-10-2018 12:2508-10-2018 12:25
3411032 42442409-10-2018 16:2909-10-2018 16:29
3531033 323209-10-2018 17:2009-10-2018 17:20
3691035 60660610-10-2018 10:2010-10-2018 10:20
2251041 41941908-10-2018 12:2708-10-2018 12:27
2541042 1108-10-2018 20:2008-10-2018 20:20
3181043 323209-10-2018 11:1909-10-2018 11:19

 

i ahve created measure from above table :  Measure name is Max ID

 MaxID = MAx('eta requisition_life_cycles'[requisition_event_id]) 

 

then i created a visualization with measure max id and drag requisition_id in clustered column chart i get data as

MaxIDrequisition_id
199
4100
5101
4102
5103
4104
5105
4106
5107
5108
4109
5110
5111
4112
5113
5114
5115
5116
5117

 

 

but i need data as

 

Max IDCount of requisition_id
135
232
314
4129
5229
617
7117

 

Hi @Anonymous

From you information, MaxID should be the max requisition_event_id per requisition_idCount of requisition_id should be the count of requisition_id per MaxID, right?

 

in my test, [Measure] is the  MaxID, i could also create a calculated column max to replace it, then create another column count for Count of requisition_id.

count = CALCULATE(COUNT(Sheet1[requisition_id,]),ALLEXCEPT(Sheet1,Sheet1[max]))

max = CALCULATE(MAX([requisition_event_id,]),ALLEXCEPT(Sheet1,Sheet1[requisition_id,]))

 

 2.png

Or if you need distintcount, you can use the following formula

distintcount = CALCULATE(DISTINCTCOUNT(Sheet1[requisition_id,]),ALLEXCEPT(Sheet1,Sheet1[max]))

 

Best Regards

Maggie

 

 

 

Anonymous
Not applicable

@v-juanli-msft Hi Maggie, thank you so much.......you made my day. As a new user, this is my first perfect visualization.

still, I don't get. Are you counting requisition_ids against requisition_event_id?

 

 

Anonymous
Not applicable

@rocky09 yes but against maximum reqisition_event id only.

I am not sure if i understand it correctly. Anyway, try to create New Table from Modeling tab and use this DAX. Make sure to replace the table name and column as per your data.

 

summarizedata = SUMMARIZE(Table1,Table1[requisition_event_id,],"Count",COUNT(Table1[requisition_id,]))
Anonymous
Not applicable

@rocky09  hi rocky thanks i get the data like 

 

requisition_event id     count

28                                1896

 

but i need bifurcation according to requisition_event_id like you can see in table that requisition_id is repeated according to event id and i need count of requisition_id wrt count of max event id  

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.