Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello everyone, i have data source that come like this:
month january
month march
month february
month april
the visual slicer
mtd
ytd
I want to get MTD only from last date of the month (from sales_running_sum column, i.e. 31/01/2024 is 104, etc.) or latest date from current month/current year and also sum YTD from MTD. And if the the month is not finished it'll be added to running MTD and YTD too. And also the slicer is divided into three sections (date, month, and year)
Is there any solution that can i implement it?
Solved! Go to Solution.
Hi @jdw_msft ,
you can write the measures like:
MTD := calculate(sum(sales_running_sum), filter(table, date=max(date)))
and
YTD := var tbl1=summarize(table, year(date),month(date), "mtd",maxx(filter(table,date=max(date)),sales_running_sum));
retrun sumx(tbl1,mtd)
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
Hi @jdw_msft ,
you can write the measures like:
MTD := calculate(sum(sales_running_sum), filter(table, date=max(date)))
and
YTD := var tbl1=summarize(table, year(date),month(date), "mtd",maxx(filter(table,date=max(date)),sales_running_sum));
retrun sumx(tbl1,mtd)
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
I try to implement it and it doesn't work like i'm expected.