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
buitrond
Frequent Visitor

Annual bar graph with first year values as reference

Hello,

I am seeking some DAX help to compare annual counts by year with the starting year as a reference for each year.

I see the time intelligence functions, but I am not sure how to have them reference the first year.
The DAX images below are as far as I got (my apologies if this is a beginner question)

DAX Attempts:

Target_Filter.png

TargetChart.png

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @buitrond 

 

Create a measure using the following DAX Expression to find the First Year Headcount:

First Year = 
Var _MinDate = 
    CALCULATE(
        MIN('1.1'[Year_Date]),
        ALLSELECTED('1.1'[Year_Date])
    )
RETURN
    CALCULATE(
        [Headount],
        '1.1'[Year_Date]=_MinDate
    )

 

Output:

VahidDM_0-1713654076562.png

 

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

LinkedIn | Twitter | Blog | YouTube 

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
VahidDM
Super User
Super User

Hi @buitrond 

 

Create a measure using the following DAX Expression to find the First Year Headcount:

First Year = 
Var _MinDate = 
    CALCULATE(
        MIN('1.1'[Year_Date]),
        ALLSELECTED('1.1'[Year_Date])
    )
RETURN
    CALCULATE(
        [Headount],
        '1.1'[Year_Date]=_MinDate
    )

 

Output:

VahidDM_0-1713654076562.png

 

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

LinkedIn | Twitter | Blog | YouTube 

YES!!!
Exactly what I needed.
Thank you @VahidDM 

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.