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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Girish_123
Helper I
Helper I

how to calculate how many number of row and ftd and mtd for given sales

Suppose

dates                                         Sales

2018 / 10 /  29                            20

2018 / 11 / 30                           20

2018 / 11 / 30                          30

2018 / 11 / 30                          40

2018 / 11 / 30                          50

2018 / 12 / 30                          60

2018 / 12/ 30                          30

2018 / 12 / 30                         20

2018 / 12 / 30                         40

2018 / 12 / 31                          60

2018 / 12/ 31                          30

2018 / 12 / 31                         20

2018 / 12 / 31                         40

with the help of below measure we can easily get mtd but i need a number of row its get for calculating mtd like given below

MTD_SALE = CALCULATE(SUM('Table'[Sales]),DATESMTD('Table'[Date]))

 

need a solution like        FTD   150            MTD     300

                                                 4                              8

1 REPLY 1
lbendlin
Super User
Super User

Replace SUM() with COUNTROWS()

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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