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

How to hide Year-To-Date data after the selected date

Hi guys,

I want to just show Year-to-day revenue by the selected year and month (especially month in the past) as the below screenshot. Could you please give me advise?

Please download sample.pbix here

 

Cumulative.PNG

 

I tried these measures but they don't work well

 

Max Selected Date =
Var SelectedYear = IF(ISFILTERED('Dates'[Financial Year]), SELECTEDVALUE('Dates'[Financial Year], "No Selection"), "No Selection")
Var SelectedMonth = IF(ISFILTERED(Dates[Month]), SELECTEDVALUE(Dates[Month], "Jun"), "Jun")
Return IF (SelectedYear = "No Selection", BLANK(), MAXX(FILTER(Dates, AND('Dates'[Financial Year] = SelectedYear, Dates[Month] = SelectedMonth)), Dates[Date]))
 
New FYTD = if ( MAX(Dates[Date]) <= [Max Selected Date], [FYTD], BLANK())
1 ACCEPTED SOLUTION

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

 

I have answered a similar question here - Flex a Pivot Table to show data for x months ended a certain user defined month.

 

Hope this helps.


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

@Ashish_Mathur Could you please share me the formulas? I cannot download the file. Did they use DAX?

I found solution thanks to this similar post

Greg_Deckler
Community Champion
Community Champion

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Thank you but I still don't see how your post solves my question. My sales are recorded by Dates rather than Year Month Quarter as per your example.

What I want is: If users choose to show FY2018 and Feb (in the past), the column chart should show Fiscal Year To Date Revenue of Jul-2017 to Feb-2018 (don't show Mar-2018 to Jun-2018)

Could you please have a look my sample data file?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors