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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
jpt1228
Responsive Resident
Responsive Resident

KPI Data Structure with multiple data types

Hello, I am building a visuilization for our company KPI's. They are in units, dollars, and percentages depending on the KPI.

 

I have been working through various structures to get to the solution. I have tried one table with goals and actuals by month then transformed in data editor by unpivoting the month columns but since they are in dollars, units, and percentages figured out I can't do that because the value field has to be the same type for all the values.

 

Dollar KPI GoalJan-17Feb-17Mar-17Apr-17May-17Jun-17Jul-17Aug-17Sep-17Oct-17Nov-17Dec-17
KPI1 Work Orders333333      
KPI2 Sales$9$12$3         
KPI3 % Completed5%10%15%20%25%30%35%40%75%85%90%100%
             
Dollar KPI ActualJan-17Feb-17Mar-17Apr-17May-17Jun-17Jul-17Aug-17Sep-17Oct-17Nov-17Dec-17
KPI1 Orders321435      
KPI2 Sales$9$10$6         
KPI3 % Completed10%15%15%15%20%40%      

 

Then I tried to create a table for each KPI but that left me with a mess of fields. Ideally I would like to pull in the KPI list, Goal and Value into the visuilization and filter on just the KPI I want. Any suggestions?

 

Thanks

1 ACCEPTED SOLUTION
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @jpt1228,

 

Based on my test, you should be able to follow steps below to unpivot your tables to different columns for each KPI like below.

 

r1.PNG

 

1. Duplicate your original table in Query Editor.

 

d1.PNG

 

2. Filter the "Dollar KPI Goal" column on the duplicated table, and only keep rows for "KPI1 Work Orders".

 

f1.PNG

 

3. Unpivot the table, rename "Attribute" column to "Month Year", "Value" column to "Work Orders"

 

upivot`1.PNG

 

4. Repeat all three steps above for "KPI2 Sales" and "KPI3 % Completed".

 

5. Use 'Append Queries' option to append all the three unpivoted tables to a single table.

 

append.PNGappend2.PNG

 

Regards

View solution in original post

2 REPLIES 2
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @jpt1228,

 

Based on my test, you should be able to follow steps below to unpivot your tables to different columns for each KPI like below.

 

r1.PNG

 

1. Duplicate your original table in Query Editor.

 

d1.PNG

 

2. Filter the "Dollar KPI Goal" column on the duplicated table, and only keep rows for "KPI1 Work Orders".

 

f1.PNG

 

3. Unpivot the table, rename "Attribute" column to "Month Year", "Value" column to "Work Orders"

 

upivot`1.PNG

 

4. Repeat all three steps above for "KPI2 Sales" and "KPI3 % Completed".

 

5. Use 'Append Queries' option to append all the three unpivoted tables to a single table.

 

append.PNGappend2.PNG

 

Regards

I was able to follow your instructions and add the goals below the actual and then sort and unpivot then append by measure tyoe... dollars, units, percentages.

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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