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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Dunner2020
Post Prodigy
Post Prodigy

Count measure does not display all values

Hi there,

 

I have two tables: date and Authorisation. The authorization table contains the information about the individual and its practice certificate start and expiry date. I have created a measure that counts the valid authorization ids. Valid authorization means those authorizations whose expiry date is in the current financial year or upcoming ones (not in previous financial years) and start date of the authorization should not be starting in upcoming financial years.  I want to display the measure in a line graph where the x-axis contains the financial years. My measure is as follow:

Count Authorisation FY = CALCULATE(COUNT('ECR Authorisation'[AuthorisationID]),FILTER(dates,Dates[FiscalYearOffset] <=0))
 
When I displayed the above measure, it looks like as follow:
 
leo_89_0-1635822139570.png

The problem with above measure is that it does not display the total of authorization ids which are valid each financial year. It only shows the count of authorisation that will be expired in that particular year. could anyone help me where I made the mistake?

 

Sample file here

 
 

 

 

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

Hi @Dunner2020 ,

 

Modify your measure as below:

Count Authorisation FY =
CALCULATE (
    DISTINCTCOUNT ( 'ECR Authorisation'[AuthorisationID] ),
    FILTER (
        ALLSELECTED ( dates ),
        Dates[FiscalYearOffset] <= 0
            && 'Dates'[Fiscal Year] = MAX ( 'Dates'[Fiscal Year] )
    )
)

And you will see:

vkellymsft_0-1635999669065.png

 

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

View solution in original post

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi @Dunner2020 ,

 

Modify your measure as below:

Count Authorisation FY =
CALCULATE (
    DISTINCTCOUNT ( 'ECR Authorisation'[AuthorisationID] ),
    FILTER (
        ALLSELECTED ( dates ),
        Dates[FiscalYearOffset] <= 0
            && 'Dates'[Fiscal Year] = MAX ( 'Dates'[Fiscal Year] )
    )
)

And you will see:

vkellymsft_0-1635999669065.png

 

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

TheoC
Super User
Super User

Hi @Dunner2020 

 

Can you try the following:

 

Count Authorisation FY = 

VAR _CountTotal = COUNTROWS ( 'ECR Authorisation')

RETURN

CALCULATE( _CountTotal , FILTER ( Dates, Dates[FiscalYearOffset] <=0 ) )

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors