The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |