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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.