Hi,
Would really need your help in creating a dax. I have a 6 years worth of data (cummulative) from 2017 to 2022 and it's on a monthly view.
Need your help in creating a dax to display the december values of each year and the current month available month for 2022.
Please see expected output below.
Thank you so much in advance!
Hi, @icdns ;
Is your problem solved? If so, Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @icdns ;
Sorry, I don't fully understand your original data model and the results you want to output, quarterly and monthly. Can you share a simple file or more information?
Hi, @icdns ;
You could create a measure as follows:
Measure =
var _max=CALCULATE(MAX('Table'[Date]),ALL('Table'))
return IF(NOT( ISINSCOPE('Table'[Date].[Month])),
CALCULATE(SUM([value]),FILTER('Table',MONTH([Date])=12 || EOMONTH([Date],0)=EOMONTH(_max,0))))
The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yalanwu-msft ,
Thank you for this. However, it is not working properly if I dril down to QUARTER and MONTHLY. Is it possible to include it in the dax? I am using a dimension date table.
Thank you so much in advance!
@icdns , Create a column year month in Table YYYYMM
and with help from date tbale
calculate(LASTNONBLANK(Table[Year Month], Sum(Table[Value])), allexcept('Date', 'Date'[year]))
Try like
calculate(Sum(Table[Value]), filter(allseleceted('Date'), 'Date'[year] = max(Date[Year]) ), filter(Table, month(Table[Date]) = calculate( month(Max(Table[Date])),filter(allseleceted('Date'), 'Date'[year] = max(Date[Year]) ))))
hi @amitchandak ,
Thank you, the formula is now displaying the december values of each year. But it doesn't display the latest current month of the year value 😞 How can I tweak the dax?
Ex:
In below example, it's displaying the value for 2017 to 2021 but not 2022.
Thank you so much for your help!!