cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vosaxalo
Frequent Visitor

How to group by a measure in a table?

I have a table in my report that looks like this:

 

CODMeasureCol?/Measure?
10024
15024
20024
25024
30015
35015
40015
45015
50015
Total13 

 

The first two columns are a data column, and a measure that I already have.

The third column is the object of my question: how can I create a column that shows the total of a measure "summarized" by the measure result? In the third column I would like to have the count of the different results of the measure. In the example you see that I have 4 times the measure = 2, and 5 times the measure = 1.

 

Thank you

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: How to group by a measure in a table?

@Vosaxalo,

Create a new  table using DAX below.

NewTable = var tem=SUMMARIZE(Table,Table[COD],"Measure Value",[Measure]) return SUMMARIZE(tem,Table[COD],[Measure Value],"measure count",COUNTX(FILTER(tem,[Measure Value]=EARLIER([Measure Value])),Table[COD]))

You can review my example.
1.JPG



Regards,

Lydia

Community Support Team _ Lydia Zhang
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
Highlighted
Microsoft
Microsoft

Re: How to group by a measure in a table?

@Vosaxalo,

Create a new  table using DAX below.

NewTable = var tem=SUMMARIZE(Table,Table[COD],"Measure Value",[Measure]) return SUMMARIZE(tem,Table[COD],[Measure Value],"measure count",COUNTX(FILTER(tem,[Measure Value]=EARLIER([Measure Value])),Table[COD]))

You can review my example.
1.JPG



Regards,

Lydia

Community Support Team _ Lydia Zhang
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

Vosaxalo
Frequent Visitor

Re: How to group by a measure in a table?

Thank you very much @v-yuezhe-msft

I tought about something like this, but I couldn't figure out the correct formula.

 

Regards,

Nicola

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors