Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Count repeated shippment methods

Morning,

 

I have 3 columns as following in the table below:

 

DateIDMethod
01/01/20211A
01/01/20212A
02/02/20211A
02/02/20212B
10/04/20211C
11/04/20213C
06/06/20212B
07/06/2021B
09/08/20211A
09/08/20212A
09/08/20213A
15/09/20213B

 

I would to calculate how many ID came back using the same Method.

 

In this example, the output should be a visualization as seen in the table below:

 

MethodCount
A2
B1
C0

 

The last line can be left out.

Should I use a variable to build a calculatetable and the countrows? I'm having trouble summarizing the data and the acess the table as a variable.

Thanks

  • REQMeasure = 
    VAR __vix=FILTER(
               SUMMARIZE(Tablex,Tablex[ID],Tablex[Method],"@cnt",COUNT(Tablex[ID])),[@cnt]>1)
    RETURN
    COUNTROWS(__vix)

7 Replies

  • REQMeasure = 
    VAR __vix=FILTER(
               SUMMARIZE(Tablex,Tablex[ID],Tablex[Method],"@cnt",COUNT(Tablex[ID])),[@cnt]>1)
    RETURN
    COUNTROWS(__vix)
    • Anonymous's avatar
      Anonymous
      Not applicable

      vikrambasriyar thanks for the reply! This solution you provide returns an error: "The syntax for 'Table' is incorrect. (DAX(VAR __vix = FILTER ( SUMMARIZE ( Table, Table[ID], Table[Method], "@cnt", COUNT(Table[ID]) ), [@cnt] > 1)RETURNCOUNTROWS(__vix)))."