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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
MasterSonic
Helper IV
Helper IV

Count rows in date table where date is ...

Hi guys

 

trying to count rows in date column.

Simply I would like to get result as count rows where date is "20/07/2020" and muliply by 50.

 

I did try countrows but it gives error about not supporting date and text values

1 ACCEPTED SOLUTION
Anonymous
Not applicable

ok please try :

 

Measure = CALCULATE(COUNTX(Table1,Table1[Column]),FILTER(Table1,Table1[Date] = DATE(2022,07,20))) * 50

Screenshot 2022-10-28 193754.png

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

thats weird can you try :

 

 

Calcualte(Count(table[date]),filter(table,table[date] = DATE(2022,07,20))) * 50

 

if this works please consider acceptig it as solution and kudos

 

HI there,

this bit works fine

Calcualte(Count(table[date]),filter(table,table[date] = DATE(2022,07,20))

 but after adding 

* 50

I got this error
A function 'FILTER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.

Anonymous
Not applicable

i think you missed a bracket when closing the calculate please make sure

Calcualte(Count(table[date]),filter(table,table[date] = DATE(2022,07,20))

this should be 

Calcualte(Count(table[date]),filter(table,table[date] = DATE(2022,07,20)))

 

Anonymous
Not applicable

ok please try :

 

Measure = CALCULATE(COUNTX(Table1,Table1[Column]),FILTER(Table1,Table1[Date] = DATE(2022,07,20))) * 50

Screenshot 2022-10-28 193754.png

 

Thank You,

verision with 

COUNTX

works  

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.