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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
pzeller
Frequent Visitor

Custom Y Axis Labels

We are new to Power BI and are trying to create a chart that displays the # of open tasks for specific categories. We have a Total Open Tasks column and then we have a seperate column for each individual task category. We are looking to display the "# of Tasks" on the X-Axis and then have the Y-Axis display a bar for each category with labels going up the Y-Axis. I've included a picture below to show a general idea of what we are looking to achieve.

Chart


This is an example of how our data would look. The 2nd table represents the data we WANT to report on where the values are the X-Axis and the header is the Y-Axis

Person IDTask 1Task 2Task 3Total
Person11236
Person23227
Person324612

 

SUM Task 1SUM Task 2SUM Task 3
6811
1 ACCEPTED SOLUTION

Hi @pzeller,

 

We can perform the pivot in DAX if you like.  

 

If you create a calculated column like this

 

Table 2 = UNION(
    SELECTCOLUMNS('Person',"Person",[Person ID],"Task Name" , "Task1" , "Value" ,[Task 1]),
    SELECTCOLUMNS('Person',"Person",[Person ID],"Task Name" , "Task2" , "Value" ,[Task 2]),
    SELECTCOLUMNS('Person',"Person",[Person ID],"Task Name" , "Task2" , "Value" ,[Task 3])
        )

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

4 REPLIES 4
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @pzeller,

 

I recommend you pivit your table to the following structure

 

PersonID , TaskID , Value
-----------------------------------
PersonA , Task 1 , 1
PersonA , Task 2 , 2
PersonA , Task 3 , 3 ,
PersonA , Task 4 , 6
PersonB , Task 1 , 3

etc

Then you will find it much easier to create your measures.  You can pivot your data in the Query Editor if that helps


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Thanks for the reply @Phil_Seamark, but when I try to put in place what you mentioned I get an error stating "This query contains transformations that cannot be used for a live connection.". It seems that when working with LIVE data (Direct Query) Power BI's functionality is really hamstrung. Now knowing this, can you see another way to accompolish this task?

 

EDIT:

I attempted what you suggested using "Import" and that worked great, but unfortunately we are required to use "Direct Query".

Hi @pzeller,

 

We can perform the pivot in DAX if you like.  

 

If you create a calculated column like this

 

Table 2 = UNION(
    SELECTCOLUMNS('Person',"Person",[Person ID],"Task Name" , "Task1" , "Value" ,[Task 1]),
    SELECTCOLUMNS('Person',"Person",[Person ID],"Task Name" , "Task2" , "Value" ,[Task 2]),
    SELECTCOLUMNS('Person',"Person",[Person ID],"Task Name" , "Task2" , "Value" ,[Task 3])
        )

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Thanks @Phil_Seamark! With this we were able to figure out how to do it and achieve the desired look.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.