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
Shelley
Continued Contributor
Continued Contributor

How to Change Starting Point for Line Chart

Hi All, I'm working on an expression that by default will show a YTD cumulation, but if/when a user selects years, then it will accumulate for all the years combined. I think I've got the formula working as intended; however, for the current YTD, the line chart begins at the start of the dataset and I want it to start at the beginning of this fiscal year, 10/1/19.

 

Here's my formula.

YTD or Cumulative Total Wins =

IF(ISFILTERED('RA_Daily_Calendar'[Fiscal_Year]),
CALCULATE([Total Wins],
FILTER(CALCULATETABLE(SUMMARIZE('RA_Daily_Calendar', 'RA_Daily_Calendar'[Fiscal_YearMonth]),
ALLSELECTED('RA_Daily_Calendar')),
ISONORAFTER('RA_Daily_Calendar'[Fiscal_YearMonth], MAX('RA_Daily_Calendar'[Fiscal_YearMonth]), DESC)
)),
(CALCULATE ([Total Wins],
FILTER (ALLSELECTED ( 'RA_Daily_Calendar' ),
AND ('RA_Daily_Calendar'[Date] <= MAX(RA_Daily_Calendar[Date]), RA_Daily_Calendar[Flag: Current Fiscal Year] = 1)
))))

 

When fiscal year is filtered, it displays as I desire:

CaptureCumulative.PNG

 

However, for the default view of current year to date, it draws like this:

 

CaptureCumulativeYTDwrong.PNG

 

Whereas, I desire this:CaptureCumulativeYTDright.PNG@Seth_C_Bauer or Mike_Carlo Any ideas? Thanks in advance!

1 ACCEPTED SOLUTION
Shelley
Continued Contributor
Continued Contributor

@v-lili6-msft Lin! You are so right! I had this so it wouldn't show Blank() in another area of the report. I forgot about it. Thank you so much!!!

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @Shelley 

I think if there is a conditional "+0" in the measure [Total Wins]

If so, just remove "+0" in measure [Total Wins].

If not your case, please share a simple sample pbix file.

 

Best Regards,
Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Shelley
Continued Contributor
Continued Contributor

@v-lili6-msft Lin! You are so right! I had this so it wouldn't show Blank() in another area of the report. I forgot about it. Thank you so much!!!

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.

Top Solution Authors