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

Insert Measure or Column for Sumx column chart

Hi there,

I have a set of data that I would like to calculate 'Material C' and 'Material F', whereby
Material C= Material A + Material B
Material F= Material D + Material E
 
I created 2 new measures but can't add these 2 up to show 'Material C'.
SUMX('Table',IF('Table'[Material]="Material A",'Table'[Value]))
CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Material]="Material B"))
 
OrganisationMaterialValue
AMaterial A10
BMaterial B20
CMaterial A20
DMaterial B30
EMaterial A10
AMaterial B20
BMaterial A10
CMaterial B30
DMaterial A30
EMaterial B40
AMaterial D10
BMaterial E20
CMaterial D20
DMaterial E30
EMaterial D10
 
Ultimately, I want to be able to plot into Clustered column chart, with X-axis being 'Organisation' and Y-axis being the comparison between 'Material C' and 'Material F' (as below).
 
Capture.PNG

 

 
 
 
 
 
 
Any help is appreciated! Thanks in advance!
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

 

I can add your 2 measures, anyway try with the following 2 measures:

 

Material C =
CALCULATE (
    SUM ( Table[Value] ),
    Table[Material] = "Material A"
        || Table[Material] = "Material B"
)
Material F =
CALCULATE (
SUM ( Table[Value] ),
Table[Material] = "Material D"
|| Table[Material] = "Material E"
)

Then you can plot Clustere Column Chart:

 

22.PNG

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous,

 

I can add your 2 measures, anyway try with the following 2 measures:

 

Material C =
CALCULATE (
    SUM ( Table[Value] ),
    Table[Material] = "Material A"
        || Table[Material] = "Material B"
)
Material F =
CALCULATE (
SUM ( Table[Value] ),
Table[Material] = "Material D"
|| Table[Material] = "Material E"
)

Then you can plot Clustere Column Chart:

 

22.PNG

 

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.