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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to union two measures

Hi,

I have two measures.

1.sum of sales(%)

2.Goal(%)

 

I want to show four months of sales in a bar chart visual along with Goal bar .

Something like this  as below

Navaneetha_0-1597841673701.png

four blue bars are sum of sales and green bar is goal.

I want to show the goal for current period

Please i need help as quick as 

 

8 REPLIES 8
Anonymous
Not applicable

Please help me if anyone know the solution of this problem.

Hi @Anonymous ,

 

What is the data type of your x-axis value? It must be  text in your sample screenshot.

 

Best Regards,

Dedmon Dai

v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

I suggest you use clustered column chart. And you can change your Goal(%) measure to 

 

NEWGoal(%) = IF(MAX(Table[Column]) = "FY21Q2",[Goal(%)],0)

 

And you visual will be like:

Capture.PNG

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

Anonymous
Not applicable

It showing error message as below 

"Dax comparison operations do not support comparing values of type number with value of type text consider using the value or format function to convert one of the values."

 

pranit828
Community Champion
Community Champion

HI @Anonymous 

 

I would create two charts and place them side by side with no borders. first chart with Bluedata and second one with green data considering you already have the below calculated values.

1.sum of sales(%)

2.Goal(%)

 

 





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile
Anonymous
Not applicable

We did like that but after we are facing issue to export the data.

Is it posibble to export  the data in one excel to see both sales and goals data?

harshnathani
Community Champion
Community Champion

HI @Anonymous ,

 

See if this helps,

 

http://www.maxwikstrom.se/powerbi/how-to-add-total-values-in-bar-and-line-charts-in-power-bi/

https://community.powerbi.com/t5/Desktop/Grand-Total-in-Bar-Chart/td-p/612631

 

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

amitchandak
Super User
Super User

@Anonymous , create a measure that only shows a goal for the current period and sales which does not show for the current period and but them on the clustered bar visual

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.