Forum Discussion
Substract Values from Same column dynamically based on another field.
- Anonymous6 years ago
Hi Anonymous ,
Please try to update the formula of your measure "Profit" just like below(the red font part is newly add):
Profit =
CALCULATE (
SUM ( Winter_Contracts_Zema[Price] ),
FILTER (
ALL ( Winter_Contracts_Zema[Trade Day - Buy] ),
Winter_Contracts_Zema[Trade Day - Buy] = [Buy_Trade Value]
)
)
- CALCULATE (
SUM ( Winter_Contracts_Zema[Price] ),
FILTER (
ALL ( Winter_Contracts_Zema[Trade Day - Buy] ),
Winter_Contracts_Zema[Trade Day - Buy] = [Sell_Trade Value]
)
)Best Regards
Rena
- Anonymous6 years ago
I solved it by using the value function in my measure! thanks to everyone who took the time to read this!
Thank you!! my profit measure is now working!
This is probably very simple, as it is in excel but I cant figure it out in Power Bi
I need to count the number of times my profit measure gave > 0 results.
=COUNTIF(Profit>0")
But i get an error in power Bi as it doesnt accept a measure as a filter. Any ideas? Im stuck in something so simple.
I also tried Calculate(Count(Winter_Contracts_Year)), [profit] > 0)
I highly appreciate the best practice here.
From my
I solved it by using the value function in my measure! thanks to everyone who took the time to read this!