Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I try to create a PBi that can show data for :
- the current month (This one is working)
- the past month :
I want to show bunch of data like school grades, for example, for the past month (that can change automatically month by month). For the moment I select the past month in the filter section but I would like to know if there is a way for the date to change automatically month by month (for example, today the past month is September because we are in October. But I know that when we will be in November the filter will stay on September instead of October).
- the month 2 times back (example, we are in September so I need to see datas for the month of August only)
I already search on Microsoft Doc and I don't manage to found something helpful for my case..
I hope someone can help me.
Regards,
Luca
Solved! Go to Solution.
Hi @Luca_Luca ,
Create a measure via this code:
last 1 moth =
var _start= DATE(YEAR(TODAY()),MONTH(TODAY())-1,1)
var _end = EOMONTH(TODAY(),-1)
return
IF(SELECTEDVALUE('Table'[Date])>=_start&&SELECTEDVALUE('Table'[Date])<=_end,1)
And put it in the filter pane of this visual, set it shows items which is 1
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Luca_Luca ,
Create a measure via this code:
last 1 moth =
var _start= DATE(YEAR(TODAY()),MONTH(TODAY())-1,1)
var _end = EOMONTH(TODAY(),-1)
return
IF(SELECTEDVALUE('Table'[Date])>=_start&&SELECTEDVALUE('Table'[Date])<=_end,1)
And put it in the filter pane of this visual, set it shows items which is 1
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello chenwu zhu,
Thank you so much !
Best Regards
Luca
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
106 | |
79 | |
71 | |
66 |
User | Count |
---|---|
141 | |
107 | |
100 | |
82 | |
74 |