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.
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
Product | Color | Sales |
A | Red | 100 |
A | Blue | 250 |
A | Green | 375 |
B | Red | 430 |
B | Blue | 540 |
B | Green | 670 |
C | Red | 710 |
C | Blue | 835 |
C | Green | 915 |
I want to see the sales for product A no matter what product I'm looking at, so something like this:
Product | Color | Sales | Request |
A | Red | 100 | 100 |
A | Blue | 250 | 250 |
A | Green | 375 | 375 |
B | Red | 430 | 100 |
B | Blue | 540 | 250 |
B | Green | 670 | 375 |
C | Red | 710 | 100 |
C | Blue | 835 | 250 |
C | Green | 915 | 375 |
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:
Now in real life I have a table with 1.6 million rows and the following headers:
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:
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
Solved! Go to Solution.
@StephenGrant
You use it this way:
BaseMortStress =
CALCULATE(
SUM(fctFinalTable[StressAmt]),
fctFinalTable[Stress]="BaseMortStress"
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@StephenGrant
You use it this way:
BaseMortStress =
CALCULATE(
SUM(fctFinalTable[StressAmt]),
fctFinalTable[Stress]="BaseMortStress"
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
95 | |
80 | |
77 | |
66 |
User | Count |
---|---|
130 | |
106 | |
105 | |
86 | |
72 |