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

Subtotal of a measure

Hi,

 

I know this is an subject that was covered a lot, unfortunately, none of the answers provided can help me, or I'm just too stupid to understand and apply them.

I have goods given for free to clients and I wish I could determine how much I could save by giving goods with lesser COGS i/o my current one.

My main issue is, I have to use a measure to calculate my COGS/unit, as my database shows a quantity of goods of 0 as long as it's free goods (so I basically calculate my COGS/unit on proper sales, then apply that figure to free goods sales).

Obviously, goods are split according to their type, size, etc... and I need to respect that breakdown when replacing free goods by others. So far so good and Power BI got me through and gave me for instance this table:

Capture.PNG

 

As you can see, if I add both rows, in a classic Power BI fashion, it doesn't add up to 691 units.

 

I cannot revert back to a column, as explained, so any SUMX based solution cannot apply there.

 

If anyone could get me a sure fire way of getting a proper sub total, I'd really like it 🙂

1 ACCEPTED SOLUTION
Anonymous
Not applicable

turns out solution was a SUMX...

 

Real_Subttoal = sumx(filter(Catalogue;Catalogue[Product Segment]=SELECTEDVALUE(Catalogue[Product Segment]) && Catalogue[Size/Dimension Unified]=SELECTEDVALUE(Catalogue[Size/Dimension Unified]));[GIK Qty])

View solution in original post

1 REPLY 1
Anonymous
Not applicable

turns out solution was a SUMX...

 

Real_Subttoal = sumx(filter(Catalogue;Catalogue[Product Segment]=SELECTEDVALUE(Catalogue[Product Segment]) && Catalogue[Size/Dimension Unified]=SELECTEDVALUE(Catalogue[Size/Dimension Unified]));[GIK Qty])

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.