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
v-yuezhe-msft
Microsoft
Microsoft

@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
v-yuezhe-msft
Microsoft
Microsoft

@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

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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors