Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
I have a pretty standard dataset from salesforce that I am using slicers to define the selection in my dashboard between a beginning and end pipeline date (from data below). Based on those selections I am looking to determine the total of the amount column that had a probability in the beginning pipeline but in the end pipeline is 0.
Example:
Start Pipeline - 4/1/2022
End Pipeline - 5/1/2022
Looking at the opportunity ID's determine if on 4/1/2022 probability > 0 and then 5/1/2022 = 0 and then taking the amount from 5/1/2022
Pipeline Date | Probability (%) | Opportunity ID | Amount |
5/1/2022 | 50 | 0066e00001dT8M9 | 25,000 |
5/1/2022 | 25 | 0065A00001dSdNS | 25,000 |
5/1/2022 | 25 | 0065A00001dRpzu | 25,000 |
5/1/2022 | 0 | 0065A00001dQsJl | 25,000 |
4/1/2022 | 25 | 0066e00001dT8M9 | 25,000 |
4/1/2022 | 25 | 0065A00001dSdNS | 25,000 |
4/1/2022 | 25 | 0065A00001dRpzu | 25,000 |
4/1/2022 | 25 | 0065A00001dQsJl | 25,000 |
ave been using this to try to calculate the change between two dates and it doesn't appear to get the right number
@jpinciak , did the measure that I posted on 30 June give you the correct results?
Hi @jpinciak ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a measure as below:
New Amount =
VAR _selopp =
SELECTEDVALUE ( 'Table'[Opportunity ID] )
VAR _startdate =
CALCULATE (
MIN ( 'Table'[Pipeline Date] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Opportunity ID] = _selopp )
)
VAR _enddate =
CALCULATE (
MAX ( 'Table'[Pipeline Date] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Opportunity ID] = _selopp )
)
VAR _mindaterate =
CALCULATE (
SUM ( 'Table'[Probability (%)] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Opportunity ID] = _selopp
&& 'Table'[Pipeline Date] = _startdate
)
)
VAR _maxdaterate =
CALCULATE (
SUM ( 'Table'[Probability (%)] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Opportunity ID] = _selopp
&& 'Table'[Pipeline Date] = _enddate
)
)
VAR _maxdateamt =
CALCULATE (
SUM ( 'Table'[Amount] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Opportunity ID] = _selopp
&& 'Table'[Pipeline Date] = _enddate
)
)
RETURN
IF ( _mindaterate > 0 && _maxdaterate = 0, _maxdateamt, BLANK () )
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
bump
bump this bad boy up, I know one of you should know this easily
This was my attempt that didnt seem to work
@jpinciak , this measure should work, and hopefully be easy to understand.
Amount of Opportunities that dropped to 0% in selected date range =
SUMX(
VALUES('YourTable'[Opportunity ID])
,VAR vFirstDate = FIRSTDATE('YourTable'[PipelineDate])
VAR vLastDate = LASTDATE('YourTable'[PipelineDate])
VAR vProbAtFirstDate =
CALCULATE(
MAX('YourTable'[Probability (%)])
, 'YourTable'[Pipeline Date] = vFirstDate
)
VAR vProbAtLastDate =
CALCULATE(
MAX('YourTable'[Probability (%)])
, 'YourTable'[Pipeline Date] = vLastDate
)
VAR vAmountAtLastDate =
CALCULATE(
MAX('YourTable'[Amount])
, 'YourTable'[Pipeline Date] = vLastDate
)
RETURN
IF(vProbAtFirstDate > 100 && vProbAtLastDate = 0, vAmountAtLastDate)
)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.