Forum Discussion

noamshn's avatar
noamshn
Frequent Visitor
3 years ago
Solved

weeks and months in x axis

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 tabl...
  • Anonymous's avatar
    Anonymous
    3 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.