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
PXJ99
Frequent Visitor

Count a column that has a ID that is a combination of text and numbers.

Hi all,

 

How to count a column that has a ID that is a combination of text and numbers.

 

For example: Table has IDs by month. I want to be able to count the distinct IDs by month and then plot the number count on a line chart. Could you please help. Thanks a lot.

 

Month    ID

Jul.          ST54

Jul.           DX98

Jul.           ST54

Aug.        DX98

Aug.        FR22

Aug.        DX98

Sep.         EY34

 

 

 

2 ACCEPTED SOLUTIONS
v-stephen-msft
Community Support
Community Support

Hi @PXJ99 ,

 

Try the following measure:

Measure = CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALLSELECTED('Table'),[Month]=MAX('Table'[Month])))

vstephenmsft_0-1677468182949.png

In the line chart:

vstephenmsft_1-1677468270484.png

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

View solution in original post

Thanks very much for your reply. Sorry for my late response. 

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @PXJ99 ,

 

Try the following measure:

Measure = CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALLSELECTED('Table'),[Month]=MAX('Table'[Month])))

vstephenmsft_0-1677468182949.png

In the line chart:

vstephenmsft_1-1677468270484.png

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

Thanks very much for your reply. Sorry for my late response. 

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.