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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to create measure for GROUP BY ?

Hi!

i want create measure, but this code throws errors

Measure =
var tb = GROUPBY(MainTable;ExchangeAct[EMail];"Cnt";SUMX(currentGroup(); MainTable[ExchangeAct_0]))
return CALCULATE(COUNT('tb'[ExchangeAct_EMail]);FILTER(tb; 'tb'[Cnt] = 0 ))
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous ,

Try like

countx(filter(summarize(MainTable;ExchangeAct[EMail];"Cnt";SUM(MainTable[ExchangeAct_0])),[Cnt] = 0),[ExchangeAct_EMail])

View solution in original post

4 REPLIES 4
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly.thanks!

 

If the above posts not help, you might consider providing the dummy pbix. 

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
amitchandak
Super User
Super User

@Anonymous ,

Try like

countx(filter(summarize(MainTable;ExchangeAct[EMail];"Cnt";SUM(MainTable[ExchangeAct_0])),[Cnt] = 0),[ExchangeAct_EMail])
Anonymous
Not applicable

it work! Thanks!

 

camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

Try applying a function like COUNTX/SUMX;MAXX..., first you need to reference a table, after that the column.

 

Ricardo



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

Proud to be a Super User!



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.