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

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.