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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
m92240
Frequent Visitor

question about a count rows by date

Hello,

I want to create a new indicator in my table to calculate the number of surveys by the year of the last survey date.

I tried to create a measure to identify the last date of the survey and then do a: calculate(count('barometrie_à_froid'[External Key]),'barometrie_à_froid'[Survey Date]=year([a year date of survey]))

But this does not work

1 REPLY 1
tamerj1
Super User
Super User

Hi @m92240 
The good practice is to first create a new calculated column that calculates the year then use it in the measure. Howeve, you may also use

=
CALCULATE (
    COUNT ( 'barometrie_à_froid'[External Key] ),
    ALLEXCEPT ( 'barometrie_à_froid', 'barometrie_à_froid'[Survey Date].YEAR )
)

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors