Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
niukasu
New Member

How to set y-axis of data visualization to be a variable?

I have a excel file contains two columns, Date  Revenue. I have done a graph with Date as x-axis and  Revenue as y-axis.

 

However, I have the other excel file with two columns, Date Profit, and I want to do the same graph for this file without creating this graph again.

 

I know how to set a new parameter to direct the data source, but how to set a new parameter to replace the Revenue with Profit or whatever it called?

 

1 ACCEPTED SOLUTION
v-xjiin-msft
Solution Sage
Solution Sage

@niukasu

 

To achieve your requirement, you can refer to following steps:

1. Go to Edit Queries. Choose Merge Queries and expand the second table to make Profit and Revenue in one sample source table.

1.PNG2.PNG

 

2. Unpivot the source table make Revenue and Profit as column values:

3.PNG

 

3. Create a parameter to filter Revenue and Profit:

4.PNG5.PNG

 

4. Close & Apply. Then you can use parameter to filter the chart.

6.PNG

Thanks,
Xi Jin.

View solution in original post

1 REPLY 1
v-xjiin-msft
Solution Sage
Solution Sage

@niukasu

 

To achieve your requirement, you can refer to following steps:

1. Go to Edit Queries. Choose Merge Queries and expand the second table to make Profit and Revenue in one sample source table.

1.PNG2.PNG

 

2. Unpivot the source table make Revenue and Profit as column values:

3.PNG

 

3. Create a parameter to filter Revenue and Profit:

4.PNG5.PNG

 

4. Close & Apply. Then you can use parameter to filter the chart.

6.PNG

Thanks,
Xi Jin.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.