Forum Discussion

Baruch_Larionov's avatar
Baruch_Larionov
Regular Visitor
10 months ago
Solved

Dynamic Y axis on DateTime X axis

Hi,

I'm new to Power BI.

I learned how to get my data tables, and made some charts manualy draging x (DateTime) and y axis (Numeric columns).

I tried to make a dynamicly y axis, using parameter with no success. According to some youtube videos...

 

parameter:

Y axis = {
    ("param1", NAMEOF('db'[param1]), 0),
    ("param2", NAMEOF('db'[param2]), 1),
    ("param3", NAMEOF('db'[param3]), 2),
    ("param4", NAMEOF('db'[param4]), 3),
}
Then I out the "Y axis" on the Y axis of the chart.
 
What methos should I use?

21 Replies

  • Baruch_Larionov , Create field Parameter using the field option in parameter 

    Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9afd
    Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE
    Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
    Field Parameters- Conditional Formatting
    : https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf
    Power BI Field Parameters, Keep Axis Sort intact| Always Sort on X/Categorial Axis: https://youtu.be/GfBrB6czByw

     

  • Hi Baruch_Larionov ,

     

    for dynamic y axis, you have to first create measures and use them in field parameters.

    Please find sample pbix file for reference.

    Dynamic Y Axis 

    Please give kudos or mark it as solution once confirmed.

     

    Thanks and Regards,

    Praful

    • Baruch_Larionov's avatar
      Baruch_Larionov
      Regular Visitor

      Thank you for your solution.

      It is working, but I have about 200 parameters that i want to dynamicly view.

      I want to create a dynamic chart for some industrial facility with big amount of sensors.

      Making calculation for every parameter is not efficiat for me.

  • gsaluja's avatar
    gsaluja
    Frequent Visitor

    Hi
    Im trying to create a power bi from a simple table with dynamic Y axis
    So, that I can select or unselect the pointers(in red) of my choice to be displayed on the graph.

     

    I tried creating parameter and putting on Y axis but graph comes as blank.

     

    The table is

     

    Customer Service IndexYearFelt GoodCompetenceKnowledgePreferred ChannelFairnessInfo (Web)OutcomeEase of AccessCommunication
    2024' Q12024▲ 8%▲ 12%▲ 10%▲ 4%▲ 7%▲ 4%▼ -6%▲ 7%▲ 9%
    2024' Q22024▲ 15%▲ 15%▲ 15%▲ 11%▲ 7%▲ 19%▲ 10%▲ 7%▲ 9%
    2024' Q32024▼ -1%▲ 3%▲ 5%▲ 3%▲ 1%▲ 12%▲ 11%▲ 7%▲ 11%
    2024' Q42024▼ -0%▼ -9%▲ 1%▼ -4%▼ -2%▲ 4%▲ 1%▼ -4%▲ 4%
    2025' Q12025▲ 6%▲ 1%▲ 10%▲ 3%▲ 4%▲ 9%▲ 13%▲ 6%▲ 9%
    2025' Q22025▲ 8%▲ 6%▲ 12%▲ 10%▲ 8%▲ 14%▲ 17%▲ 12%▲ 14%
    2025' Q32025▲ 16%▲ 16%▲ 21%▲ 13%▲ 11%▲ 17%▲ 20%▲ 13%▲ 20%
    2025' Q42025▲ 11%▲ 8%▲ 9%▲ 12%▲ 6%▲ 8%▲ 5%▲ 10%▲ 8%

     

     

    Currently without dynamic Y axis - My graph on power bi looks like below - 

     

     

    • Ashish_Mathur's avatar
      Ashish_Mathur
      Super User

      Hi,

      If that is the structure of the raw data set, then in Power Query,  select the first 2 columns, right click and select "Unpivot Other Columns".  Now use Field parameters.

      • gsaluja's avatar
        gsaluja
        Frequent Visitor

        Hi Ashish,

         

        Thanks for the revert but the solution did not work.

         

        Let me simplify my issue here.

         

        The table above is the raw data.

         

        I have simply plotted the graph based on above table on my power bi. (no query's or commands, just a simple plain visual graph).

         

        However, I would like to filter my graph based on my selection from the pointers (highlighted in red) using a drop down slicer.

         

        I tried creating the field parameter slicer but the graph comes out blank.

         

        Im not a power bi trained professional.

         

        If you can please help me in simpler terms to create the graph from the above table and having a drop down slicer with the pointers highlighted in red which I can select or unselect on my discretion.

         

        Thanks in advance.

        regards,

        Geet Singh.