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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
laissaandrade
New Member

How to use two measures in the same axis in graph bar

Hello guys.

 

My database has 3 columns: 1. Amount, 2. Cost type (Gross or Allocation), Category (LTF, PLTF, Budget).

 

In our context we have: Gross + Allocation = Net


I need a bar chart where the axis only shows Gross and Net, comparing the 3 categories, like this graph below:

 

laissaandrade_0-1660656826321.png

 

I'm having trouble doing that because "Net" it's not in the "Cost Type" column. It's the results of the addiction Gross+Allocation, like I said before.

 

Does anyone know how to do that? Thanks in advance!

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @laissaandrade

 

Create a disconnected table with the values

Gross and Net.  Then add a measure similar to this one

 

Group value =

       SWITCH(

            TRUE(), 

            SELECTEDVALUE(TABLE[COLUMN])  = "Gross",  [Gross], 

SELECTEDVALUE(TABLE[COLUMN])  = "Net",  [Net] 

 

The Table[Column] should be replaced by the column name of the disconnected table,  also use that table for your axis value. 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @laissaandrade

 

Create a disconnected table with the values

Gross and Net.  Then add a measure similar to this one

 

Group value =

       SWITCH(

            TRUE(), 

            SELECTEDVALUE(TABLE[COLUMN])  = "Gross",  [Gross], 

SELECTEDVALUE(TABLE[COLUMN])  = "Net",  [Net] 

 

The Table[Column] should be replaced by the column name of the disconnected table,  also use that table for your axis value. 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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