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
POWER_TESTING
Helper I
Helper I

100% stacked bar

Hi Community,

 

how can i write expression for 100% staked bar chart.

Sample data....

BI Tool	        Area	        Sales
Qlikview	Europe	        100
Qlikview	North America	200
Qlikview	Scandinavia	300
Qlikview	South America	125
Spotfire	Europe	        352
Spotfire	North America	65
Spotfire	Scandinavia	95
Spotfire	South America	46
PowerBI	        Europe	        58
PowerBI	        North America	54
PowerBI	        Scandinavia	23
PowerBI	        South America	156
Qlik Sense	Europe	        292
Qlik Sense	North America	60
Qlik Sense	Scandinavia	300
Qlik Sense	South America	80

I have to show 

Dimensions:  BI Tools and Area

general expression like Sum(Sales)/Sum(ALL Sales)

 

Please can any one help me...

 

Thanks in Advance.....

1 ACCEPTED SOLUTION
mitsu
Resolver IV
Resolver IV

Following is one of the ways to achieve this

 

= DIVIDE(SUM('Table'[Sales]),CALCULATE(SUM([Sales]),FILTER(ALL('Table'),[Area]<>"")))

View solution in original post

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @POWER_TESTING,

 

Actually, if you use a 100% stacked bar chart to display above data, there is no need to write expression, it will calculate percentage (sales/total sales) automatically. Please see:

1.PNG

 

If I have something misunderstood, please provide more description about your desired output. Please illustare how to Sum(Sales) and what is ALL Sales. Some sales per [BI tool] or per [Area] or acorss whole table?

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mitsu
Resolver IV
Resolver IV

Following is one of the ways to achieve this

 

= DIVIDE(SUM('Table'[Sales]),CALCULATE(SUM([Sales]),FILTER(ALL('Table'),[Area]<>"")))

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.