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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors