Dax Formula Combination

Hi Everyone and Sam,

I am trying to create two dax formulas then try and combine the results.

Formula 1 is as follows:
image
This is a simple formula that just provides me with average sales of each month across each year and works as desired.

Formula 2: i am having trouble creating this formula - i am trying to calculate my sales experienced this year ONLY. E.G if the year is 2018 i only want sales from january -> now().

I then want to combine these two formulas to create a prediction. If the year is 2018 and the current month is august i want the actual values in formula 2 to be displayed up until august and then the following months have the numbers from formula 1 as a prediction to give me one trend line

any help is appreciated,

cheers

Hi Robert does the detailed here solve this.

A lot depends on the content this calculation is in, and I’m not sure by the post.

Logic like

IF( LASTDATE( Dates column) <= TODAY(), true results, false results )

This usually works.

Another way you can do it is you can have a switch column inside your dates table that just runs simple logic like this.

IF( Dates column <= TODAY(), True, False )

Then you formulas only require a FILTER referencing this particular field.

I think the first one is more likely going to be your best bet I would say.

Check out the video it describes it there.

Here’s another one to review as well.