cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

Highlighted
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
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors