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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
StephenGrant
Frequent Visitor

Show results for one particular product in all rows

Hello

I'm wondering if someone can help me with a problem I'm stuck on.  

If I start with a simplified example.  Imagine I've got a table like this

ProductColorSales
ARed100
ABlue250
AGreen375
BRed430
BBlue540
BGreen670
CRed710
CBlue835
CGreen915

 

I want to see the sales for product A no matter what product I'm looking at, so something like this:

ProductColorSalesRequest
ARed100100
ABlue250250
AGreen375375
BRed430100
BBlue540250
BGreen670375
CRed710100
CBlue835250
CGreen915375

I can get this to work with this measure:

Measure =

   Calculate(

      sum(fctTable[Sales]),

      All(fctTable[Product]),

      fctTable[Product]="A"

   )

Which gives exactly what I want; this: 

StephenGrant_0-1636281817367.png

 

Now in real life I have a table with 1.6 million rows and the following headers:

StephenGrant_1-1636282011951.png


Where stress is one of 7 values of which "BaseMortStress" is one.  The table is effectively 7 union'ed tables 
StressAmt are multiple decimal numbers (the 'facts' here)

Full/TMTP contains 2 values; either "Full" or "TMTP"

UniqueProd is 267 product names
ProjYear is a whole number from 0 to 80
AoC_Step is one of 12 values

Now, I thought I could just use this measure:

  BaseMortStress =
    CALCULATE(
    SUM(fctFinalTable[StressAmt]),
    ALL(fctFinalTable[Stress]),
    fctFinalTable[Stress]="BaseMortStress"
  )
And get the results for the "BaseMortStress" 
fctFinalTable[Stress] value for every value in fctFinalTable[Stress].  But this isn't the case, when it's not BaseMortStress I just get a blank.  Which isn't what I want.
StephenGrant_3-1636282733336.png

I want the numbers in that BaseMortStress column repeated in all other columns.

Can anyone help me with this?  It would be much appreciated.

 

Thanks,

Stephen



 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@StephenGrant 

You use it this way:

 BaseMortStress =
    CALCULATE(
     SUM(fctFinalTable[StressAmt]),
     fctFinalTable[Stress]="BaseMortStress"
  )
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

1 REPLY 1
Fowmy
Super User
Super User

@StephenGrant 

You use it this way:

 BaseMortStress =
    CALCULATE(
     SUM(fctFinalTable[StressAmt]),
     fctFinalTable[Stress]="BaseMortStress"
  )
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors