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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

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

1 ACCEPTED SOLUTION

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

View solution in original post

7 REPLIES 7

REQMeasure = 
VAR __vix=FILTER(
           SUMMARIZE(Tablex,Tablex[ID],Tablex[Method],"@cnt",COUNT(Tablex[ID])),[@cnt]>1)
RETURN
COUNTROWS(__vix)
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)))."

Use as a measure and replace the table name in the DAX.

vikrambasriyar_0-1644409844682.png

 

Anonymous
Not applicable

filipebodas_0-1644410203028.png


It stills gives me an error..

I had some info to the original post

Try removing the '' marks

Hello

 

Try putting ' ' marks around all your references to Table.  DAX thinks you are calling the function TABLE()

 

Regards

Richard

Anonymous
Not applicable

That was it Richard, thanks for the detail!

vikrambasriyar thanks for the solution!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.