Forum Discussion
Last Day calculating
- Anonymous5 years ago
Hi erhan_79
I update my Slicer Table , Fact Table and measure.
New Fact Table:
Add WeekNum and YearMonth column.
WeekNum = WEEKNUM('Table'[Date],2)YearMonth = YEAR('Table'[Date])*100+MONTH('Table'[Date])Slicer Table:
Add a YearMonth column than before.
Measure:
Measure = VAR _SelectYearMonth = VALUES('YearMonthFilter'[YearMonth]) VAR _LastWeek = MAXX(FILTER(ALL('Table'),'Table'[YearMonth]=MAX('Table'[YearMonth])&&'Table'[YearMonth]IN _SelectYearMonth),'Table'[WeekNum]) Return IF(ISFILTERED(YearMonthFilter[MonthName]),IF(MAX('Table'[YearMonth]) IN _SelectYearMonth&&MAX('Table'[WeekNum]) = _LastWeek,1,0))Result is as below.
By default it will show blank.
Select 2021 January.
Select 2021 Jan and 2022 Feb:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dear Anonymous ;
thansk for your reply ; we are very closer for the solution 🙂 now i will try to explain with more detail , can we manage like this ?
there will be 2 filter slicers , one of them year and the other one month name . When i select year 2021 and month january system will show infos on the table visiual as your last example that you showed me ( the latest week info of january 2021 )
If i will want to filter on year filter 2022 and on month filter February for example , then system will show me in the visiual table the datas of the latest week of 2022 February .
and also i would like to see multiple filtering too but i dont know how can we manage it , i mean at the same time i would like to see multiple filtered months , in one visual i would like to see latest week infos of 2021 january , and latest week infos of 2022 february
Hi erhan_79
I update my Slicer Table , Fact Table and measure.
New Fact Table:
Add WeekNum and YearMonth column.
WeekNum = WEEKNUM('Table'[Date],2)YearMonth = YEAR('Table'[Date])*100+MONTH('Table'[Date])
Slicer Table:
Add a YearMonth column than before.
Measure:
Measure =
VAR _SelectYearMonth = VALUES('YearMonthFilter'[YearMonth])
VAR _LastWeek = MAXX(FILTER(ALL('Table'),'Table'[YearMonth]=MAX('Table'[YearMonth])&&'Table'[YearMonth]IN _SelectYearMonth),'Table'[WeekNum])
Return
IF(ISFILTERED(YearMonthFilter[MonthName]),IF(MAX('Table'[YearMonth]) IN _SelectYearMonth&&MAX('Table'[WeekNum]) = _LastWeek,1,0))
Result is as below.
By default it will show blank.
Select 2021 January.
Select 2021 Jan and 2022 Feb:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.