Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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 ))
  • Anonymous ,

    Try like

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

4 Replies

  • Anonymous ,

    Try like

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

      it work! Thanks!

       

  • camargos88's avatar
    camargos88
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous ,

     

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

     

    Ricardo

  • v-diye-msft's avatar
    v-diye-msft
    Icon for Community Support rankCommunity 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.