cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Girish_123
Frequent Visitor

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
May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through June10th!

Power BI Dev Camp Session 22 without aka link and time 768x460.jpg

Check it Out!

Watch Session 22 Ted's Dev Camp along with past sessions!

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!

Top Solution Authors
Top Kudoed Authors