View My Drafts
Hello,I have a simple table called date table and it returns or calculate values for month of April instead start of the month in data table as Nov.Also, for last month it return September instead of Oct.Is anyone had similar kind of issue?DAX:>> start_dt =CALCULATE ( [TotalSales], FILTER ( date, date[MMYY].[Month] = MIN ( ( date[MMYY].[Month] ) ) ))
>>end_dt =CALCULATE ([Totalsales],FILTER ( date, date[MMYY].[Month] = MAX ( ( date[MMYY].[Month] ) ) ))Thanks for supportingRaj
Thanks Vilmar,Its not the case as data is correct. In my case there are product categories which may occurred as per sales transaction in any month and DAX shall pick the correct start and end date for that product category. To summarize below is the sample table and it shall pick date and Sales value like:
Sample table :
@Rd 3nidad thanks it work as expected
Thanks to others as well who all supported in this thread!
Hi Raj,Hard to say without full view of your model.It can be:
1. Filter context from page.2. Year can be set on Fiscal Year.3. as TODAY is 1st day of the new month, data and model are not submitted/refreshed yet.4. a few more reasons.
>> start_dt =
FILTER ( date, MONTH ( date[MMYY] ) = MONTH ( MIN ( date[MMYY] ) ) )
>> end_dt =
FILTER ( date, MONTH ( date[MMYY] ) = MONTH ( MAX ( date[MMYY] ) ) )