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
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
Super User
Super User

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...


@ 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!:
The Definitive Guide to Power Query (M)

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
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.