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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
prabhatnath
Advocate III
Advocate III

How to get Direct Values in Column Chart instead of Aggregated values

I have the following 2 tables and wanted help to have a chart done as below from the 2 tables in PBI Desktop.

 

The below chart I did in Excel, and wanted to get it done in PBI. I make a Pivot Table from Table-2 and then added another column and did a VLookup to pull the Capacity value from Table-1 and then did a Chart.


Another way we can do this in Excel is to add a new column to Table-1 and get the Sum of the Consumed Value for each Work Id from Table-2 (SUM based on Filter) and do a chart from Table-1. 

 

prabhatnath_0-1683887154908.png

 

Table-1

ProgramWorkIdCapacity
P1W125
P1W220
P1W328

 

Table-2

JobIdWorkIdConsumed
101W110
102W14
103W18
104W212
105W212
106W315
107W310


Thanks,
Prabhat

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@prabhatnath , create a common table work id and join with both tables and use that in visual

 

workid= distinct(union(distinct(Table1[workid]),distinct(Table2[workid])))

 

Sum of consumed and capacity with common dimension in visual will do

 

Power BI- DAX: When I asked you to create common tables: https://youtu.be/a2CrqCA9geM
https://medium.com/@amitchandak/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-soluti...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Anonymous
Not applicable

Hi @prabhatnath ,

Please try below steps:

1. create a new table with below dax formula

Table3 = DISTINCT(UNION(VALUES(Table1[WorkId]),VALUES(Table2[WorkId])))

vbinbinyumsft_0-1684216356311.png

2. create two measure with below dax formula

Measure =
VAR _id =
    SELECTEDVALUE ( Table3[WorkId] )
VAR tmp1 =
    FILTER ( ALL ( Table1 ), [WorkId] = _id )
RETURN
    SUMX ( tmp1, [Capacity] )
Measure2 =
VAR _id =
    SELECTEDVALUE ( Table3[WorkId] )
VAR tmp1 =
    FILTER ( ALL ( Table2 ), [WorkId] = _id )
RETURN
    SUMX ( tmp1, [Consumed] )

3. add a clustered column chart with Table3 filed and measure

vbinbinyumsft_1-1684216518013.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
prabhatnath
Advocate III
Advocate III

@amitchandak and @Anonymous thanks for the reply on this and the reply helped me. I can select just one as a Solution I believe.  

Anonymous
Not applicable

Hi @prabhatnath ,

Please try below steps:

1. create a new table with below dax formula

Table3 = DISTINCT(UNION(VALUES(Table1[WorkId]),VALUES(Table2[WorkId])))

vbinbinyumsft_0-1684216356311.png

2. create two measure with below dax formula

Measure =
VAR _id =
    SELECTEDVALUE ( Table3[WorkId] )
VAR tmp1 =
    FILTER ( ALL ( Table1 ), [WorkId] = _id )
RETURN
    SUMX ( tmp1, [Capacity] )
Measure2 =
VAR _id =
    SELECTEDVALUE ( Table3[WorkId] )
VAR tmp1 =
    FILTER ( ALL ( Table2 ), [WorkId] = _id )
RETURN
    SUMX ( tmp1, [Consumed] )

3. add a clustered column chart with Table3 filed and measure

vbinbinyumsft_1-1684216518013.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@prabhatnath , create a common table work id and join with both tables and use that in visual

 

workid= distinct(union(distinct(Table1[workid]),distinct(Table2[workid])))

 

Sum of consumed and capacity with common dimension in visual will do

 

Power BI- DAX: When I asked you to create common tables: https://youtu.be/a2CrqCA9geM
https://medium.com/@amitchandak/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-soluti...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors