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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ET2018
Frequent Visitor

How to use count values in column by using Measure?

 

I need to count number of Train # appear by date. 

However, as there are 3 classes per train, if I use count the number of Train # will be multiplied by 3.

May I know how to use Measures to count Train # per day?

 

Thanks!

 

未命名.png

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi ET2018,

 

To achieve your requirement, you can use DAX formula below:

Number of Train# Per day = CALCULATE(DISTINCTCOUNT(Table1[Train#]), ALLEXCEPT(Table1, Table1[Date]))

Capture3.PNG

 

Regards,

Jimmy Tao

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi ET2018,

 

To achieve your requirement, you can use DAX formula below:

Number of Train# Per day = CALCULATE(DISTINCTCOUNT(Table1[Train#]), ALLEXCEPT(Table1, Table1[Date]))

Capture3.PNG

 

Regards,

Jimmy Tao

Thanks!

 

it works!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.