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
Tomek1982
Helper I
Helper I

Calculation up to today

Hi,

I am trying to create a graph for KPI to see where I am versus scoring with a following result.

Tomek1982_0-1680549780415.png

What I would like to achieve is to limit this purple line with current status so it is calculated only to the current year and not for the whole year.

How to do that?

pbix is here

1 ACCEPTED SOLUTION
Wilson_
Memorable Member
Memorable Member

Hi Tomek,

 

I've added an IF function to your running twelve month points measure, to first check if the date is not in the future. Please let me know if this works for you or if you were looking for something different. 😄

 

points R12m = 
IF ( 
    MIN ( 'calendar'[Date] ) <= TODAY(),
    CALCULATE (
        [points],
        DATESINPERIOD ( 'calendar'[Date], MAX ( 'calendar'[Date] ), -12, MONTH )
    )    
)

 

----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

View solution in original post

1 REPLY 1
Wilson_
Memorable Member
Memorable Member

Hi Tomek,

 

I've added an IF function to your running twelve month points measure, to first check if the date is not in the future. Please let me know if this works for you or if you were looking for something different. 😄

 

points R12m = 
IF ( 
    MIN ( 'calendar'[Date] ) <= TODAY(),
    CALCULATE (
        [points],
        DATESINPERIOD ( 'calendar'[Date], MAX ( 'calendar'[Date] ), -12, MONTH )
    )    
)

 

----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

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.