Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Calling all PBI Wizards,
I have been spinning my wheels on this for more time than I would like to admit and cannot come up with a solution. I have created a measure that is fairly straight forward and works in a table visual when it has the proper context:
Test =
Var
Max Date = 'Data'[Max Date]
var
Flag = if('Data'[Return] < 0, 1,0)
Return
Flag * calculate(sum('Data'[USD]),
FILTER('Data',
sum('Data'[YR1_Return]) <> blank() &&
'Data'[Flag] = "N" &&
'Data'[Date] = Max Date))The reason why this works in a table visual is it executing the multiplier in the context of an account, however when I remove the context of the account instead of multiplying each row by a 1 that meets the criteria, it multiplies my total amount by a 0 as there is not context for the flag variable, returning zero.
I have tried a calculated column in order to execute the flag on a row level, however this does not give me the same result, however I am not sure why.
My question is, how can I create a measure to roll this up as I need to use the results of this measure to generate multiple other measures.
Appreciate any and all help!
Thanks,
JMWB
Hi again.
I wanna see your model (I already see that it's most likely incorrect) and would also want you to describe what the measure you're after should do.
Thanks.
Best
Darek
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 11 | |
| 8 | |
| 8 | |
| 8 |