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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

YTD help in charts

I am wanting this graph to only show counts for the YTD:

 

The current year line drops where the current day ends. I do not want this result. 

 

ytd.PNG

 

Here is the code calculating the value:

 

Renewal Rate = DIVIDE(SUM(Renewals_ODW[IS_RENEWED_]), SUM('Renewals_ODW'[Contract Count]))

 

Any Help?

1 ACCEPTED SOLUTION

Hi @Anonymous, on the basis of @SteveCampbell's answer, if you make a slight modification it might work:

 

Renewal Rate = 

CALCULATE (
    DIVIDE (
        SUM ( Renewals_ODW[IS_RENEWED_] ),
        SUM ( 'Renewals_ODW'[Contract Count] )
    ),
    KEEPFILTERS( Date[date] <= TODAY () )
)

 

View solution in original post

7 REPLIES 7
SteveCampbell
Memorable Member
Memorable Member

Do you mean you do not wish to show values after today? I am assuming there is some date column:

 

Renewal Rate = 

CALCULATE (
    DIVIDE (
        SUM ( Renewals_ODW[IS_RENEWED_] ),
        SUM ( 'Renewals_ODW'[Contract Count] )
    ),
    Date[date] <= TODAY ()
)

 

Let me know if I have misunderstood



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



Anonymous
Not applicable

Thanks Steve!

 

After applying this measure, the chart only showed the current year and the same value for every month.

 

ytd2.PNG

 

I am wanting to show a Year over Year view and I want each line that represents a year to end on the current day.

 

For example:

 

2015, 2016, and 2017 all show data until the current day; November 28th

This may be with some relationship issue - is the date you arwe using joined correctly i.e. not time in either?
Is this data confidential? I'd be willing to have a look if you sent the file



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



Anonymous
Not applicable

Here is the calendar table:

Date table.PNG

 

Here is the facts table: (using expiration date)

date fix.PNG

 

Here is the relationship:

date fix 2.PNG

Hi @Anonymous, on the basis of @SteveCampbell's answer, if you make a slight modification it might work:

 

Renewal Rate = 

CALCULATE (
    DIVIDE (
        SUM ( Renewals_ODW[IS_RENEWED_] ),
        SUM ( 'Renewals_ODW'[Contract Count] )
    ),
    KEEPFILTERS( Date[date] <= TODAY () )
)

 

Anonymous
Not applicable

It worked, Thanks!

@Anonymous share sample data as @SteveCampbell mentioned. And also share the relationship between tables, there might be something which we are not seeing..



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.