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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
so i have a chart with x axis of all the weeks of the year in this format: "01/01/202 - 07/01/2023". i get this format from a table i created, the table columns are:
in addition i have a table of hebew months:
now, what i want to do is to make a filter in the chart to show only the last 2 months (in the months table the last month will be the current month). the problem is that I didnt succeed to connect between the weeks dates and the months number.
I would be glad for some help here.
Thank you in advance.
Solved! Go to Solution.
Hi @noamshn ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measure.
Flag =
var _max=MAXX(ALL('months'),'months'[Value])
var _min=_max-1
return IF(MAX('Table'[Month of the week]) = _max || MAX('Table'[Month of the week])=_min ,1,0)
(3) Place [Flag]=1 on the visual object filter. At this point the visual object will only show the last two months of data.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @noamshn ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measure.
Flag =
var _max=MAXX(ALL('months'),'months'[Value])
var _min=_max-1
return IF(MAX('Table'[Month of the week]) = _max || MAX('Table'[Month of the week])=_min ,1,0)
(3) Place [Flag]=1 on the visual object filter. At this point the visual object will only show the last two months of data.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you, it worked. but in the end i used "'New Chart'[Week Completed]>WEEKNUM(TODAY())-4" inside the measure, because i realized i need the last 4 weeks.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 38 | |
| 36 | |
| 29 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 74 | |
| 66 | |
| 65 |