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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi,
I am struggling to find a solution to my problem and have searched the forum for hours trying to peice together a solution.
I have a hypothetical table with 3 columns: Date, BusinessID, Sales. Using DAX, I want only show values from the Sales column that occur after each business' first initial positive Sale value. The first positive Sale acts as a trigger for us to start tracking further data, so I want to ignore all negative Sales values until a positive one occurs, then show all. In the below screenshot, the orange column has the desired behavior.
I need to do this in DAX, because the Sales column is a measure that relies on a date from another table.
Solved! Go to Solution.
This is a column since I don't have your data or measure. No guarantees but you get the idea.
TxnsFromPos = VAR _col = CALCULATE(MIN(TableSale[Date]), TableSale[Sales] > 0 ,ALLEXCEPT(TableSale, TableSale[businessiD]))
RETURN
if (_col <= TableSale[Date], TableSale[Sales], BLANK())
Could I ask that in future you post your data (not a picture) and any relevant measure code (or pbix).
Hope it helps.
I am thinking something like the following:
Column =
VAR __BusinessID = [BusinessID]
VAR __Date = [Date]
VAR __Table = FILTER('Table',[BusinessID] = __BusinessID && [Date] <= __Date)
VAR __FirstPositive = MINX(FILTER(__Table,[Sales] > 0),[Date])
RETURN
IF(__Date >= __FirstPositive,[Sales],BLANK())
I am thinking something like the following:
Column =
VAR __BusinessID = [BusinessID]
VAR __Date = [Date]
VAR __Table = FILTER('Table',[BusinessID] = __BusinessID && [Date] <= __Date)
VAR __FirstPositive = MINX(FILTER(__Table,[Sales] > 0),[Date])
RETURN
IF(__Date >= __FirstPositive,[Sales],BLANK())
This worked great! Thanks, Greg! I may have been overthinking it...
This is a column since I don't have your data or measure. No guarantees but you get the idea.
TxnsFromPos = VAR _col = CALCULATE(MIN(TableSale[Date]), TableSale[Sales] > 0 ,ALLEXCEPT(TableSale, TableSale[businessiD]))
RETURN
if (_col <= TableSale[Date], TableSale[Sales], BLANK())
Could I ask that in future you post your data (not a picture) and any relevant measure code (or pbix).
Hope it helps.
Thanks! I will share the pbix in the future. good advice!
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 6 | |
| 6 | |
| 5 |