cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
majid_75
Frequent Visitor

Dax Measure with Forecast

Hello,

 

I want a  bar chart or aother like this image :

 

I have a select Year and  Month : 2020 and 08

 

image.png

 

So Blue is my measure total sale for example 01/01/2020 until 31/08/2020 :
Total Sales = Sum(Sales)

And Purple is my measure Pipe 01/09/2020 until 31/12/2020:

Pipe = CALCULATE(
[forcast],
FILTER(
ALL('Date'),
'Date'[Year]=YEAR(DATE(SELECTEDVALUE('Date'[Year]),SELECTEDVALUE('Date'[Month]),1 ))
&& 'Date'[Yearmonth] > SELECTEDVALUE('Date'[Yearmonth])
&& 'Date'[Date] <= ENDOFYEAR('Date'[Date])
)
)

 

But it's don't work, pls help me!

 

Thanks!

1 ACCEPTED SOLUTION
CNENFRNL
Super User III
Super User III

Hi, @majid_75 , I assume you're intended to apply filters this way,

Pipe =
VAR __EndOfYr = ENDOFYEAR ( 'Date'[Date] )
RETURN
    CALCULATE (
        [forcast],
        'Date'[Yearmonth] > SELECTEDVALUE ( 'Date'[Yearmonth] ),
        'Date'[Date] <= __EndOfYr
    )

View solution in original post

2 REPLIES 2
majid_75
Frequent Visitor

Hello @CNENFRNL ,

 

Thanks you very much but it's don't work.

CNENFRNL
Super User III
Super User III

Hi, @majid_75 , I assume you're intended to apply filters this way,

Pipe =
VAR __EndOfYr = ENDOFYEAR ( 'Date'[Date] )
RETURN
    CALCULATE (
        [forcast],
        'Date'[Yearmonth] > SELECTEDVALUE ( 'Date'[Yearmonth] ),
        'Date'[Date] <= __EndOfYr
    )

View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.