Forum Discussion

JSIQUEI-YYC-ENB's avatar
2 years ago
Solved

Dynamically Change Dates x-axis based on a Slicier Selection

Hi there,

I have a chart in Power BI where the data can be filter by a slicer. The problem is, when I filter for 2024 only (second picture below), my x-axis doesn't change dynamically based on the slicer selection. It keeps the the other periods outside the range in blank, and the chat looks weird. My goal would be to filter the x-axis based on the slicer selection, showing only 2024 dates by month, without showing the other years on the x-axis. 

 

any help will ber greatly appreciated... thanks! 

 

 

 

 

 

 

  • JSIQUEI-YYC-ENB there are couple of possible issues, most probably it is data modelling (and dax) issue:
    1) could you send screenshot of data model, to see where data comes from and which relationship is used
    2) please share DAX calculations for measures that are used on chart (i suppose here is the issue)
    3) try deselecting option "show items with no data"


    Cheers,
    Nemanja Andic

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi JSIQUEI-YYC-ENB 

     

    nandic Thank you very much for your prompt reply and here allow me to share some of it.

     

    I suggest you try to format the x-axis dates to have a hierarchical structure.

     

     

    Make sure your slicer uses the date column associated with the table.

     

    Here is the result.

     

    Regards,

    Nono Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • nandic's avatar
    nandic
    Icon for Resident Rockstar rankResident Rockstar

    JSIQUEI-YYC-ENB there are couple of possible issues, most probably it is data modelling (and dax) issue:
    1) could you send screenshot of data model, to see where data comes from and which relationship is used
    2) please share DAX calculations for measures that are used on chart (i suppose here is the issue)
    3) try deselecting option "show items with no data"


    Cheers,
    Nemanja Andic

    • JSIQUEI-YYC-ENB's avatar
      JSIQUEI-YYC-ENB
      Icon for Helper I rankHelper I

      Hi nandic , thanks for you suggestion. I reviewed the meassure that I used on the chart, and now it's working porperly. Many thanks! 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi JSIQUEI-YYC-ENB 

     

    nandic Thank you very much for your prompt reply and here allow me to share some of it.

     

    I suggest you try to format the x-axis dates to have a hierarchical structure.

     

     

    Make sure your slicer uses the date column associated with the table.

     

    Here is the result.

     

    Regards,

    Nono Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.