cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Seb_77
New Member

Do not show future value of AVERAGEX and SUMMARIZE

Hello,

I have been removing all future dates from my dashboards with the help of a future value column in the calendar table.

However I am struggling to remove future dates in the below case :

My inventory value stop in April 2020, but the average trailing twelve month continue, I want it to stop in April too.

0_Average_inventory_TTM = 

VAR CALENDAR_YTD = 

CALCULATETABLE(
    'CALENDAR',
    DATESINPERIOD('CALENDAR'[Date],LASTDATE('CALENDAR'[Date]),-1,YEAR),
    'CALENDAR'[FutureDate] = "PAST"
)

VAR CALENDAR_MONTH_YTD =

SUMMARIZE(
    CALENDAR_YTD,
    'CALENDAR'[Year],
    'CALENDAR'[Month],
    "AMOUNT",
    CALCULATE(                              
        [1_AMOUNT_REVERSE_YTD],
        'ACCOUNT FAMILY'[P&L] = "300",
        'CALENDAR'[FutureDate] = "PAST"
    )
)

RETURN

CALCULATE(
    AVERAGEX(CALENDAR_MONTH_YTD,[AMOUNT]),
    'CALENDAR'[FutureDate] = "PAST")

2020-04-21 13_42_14-BFT Financial infographics V3 - Power BI Desktop.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I tried to remove future date with the filter : 

'CALENDAR'[FutureDate] = "PAST", it usually works well but not this time.
 
Could you help me find a solution ?
 
Thank you
2 ACCEPTED SOLUTIONS
danextian
Resident Rockstar
Resident Rockstar

 Hi @Seb_77 

You can use relative date filtering. Add a the date field to the visual/page/report filter and filter as in the image below:

relative date filtering.png

Did I answer your question? Mark my post as a solution!
"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
www.linkedin.com/in/danebelarminocpa

View solution in original post

amitchandak
Super User
Super User

Make sure both Inventory Value and Avg TTM is controlled. Or You use relative date calendar or page or visual level relative date filter to have data <= today

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

Make sure both Inventory Value and Avg TTM is controlled. Or You use relative date calendar or page or visual level relative date filter to have data <= today

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

danextian
Resident Rockstar
Resident Rockstar

 Hi @Seb_77 

You can use relative date filtering. Add a the date field to the visual/page/report filter and filter as in the image below:

relative date filtering.png

Did I answer your question? Mark my post as a solution!
"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
www.linkedin.com/in/danebelarminocpa

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!