Forum Discussion
weeks and months in x axis
- Anonymous3 years ago
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.