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! Learn more
I made measure _CurrentDataValueMPreviousDateValue
and i try to count rows that _CurrentDataValueMPreviousDateValue is minus
so i tried
Solved! Go to Solution.
Hi @Fighting21
1st create calculated column that computes the difference for each row
CurrentDateValueMPreviousDateValue = 
VAR CurrentDate = 'DataTable'[Date]
VAR PreviousDate =
    CALCULATE(
        MAX('DataTable'[Date]),
        FILTER(
            ALL('DataTable'),
            'DataTable'[Date] < CurrentDate
        )
    )
VAR CurrentDateValue =
    CALCULATE(
        SUM('DataTable'[Value]),
        'DataTable'[Date] = CurrentDate
    )
VAR PreviousDateValue =
    CALCULATE(
        SUM('DataTable'[Value]),
        'DataTable'[Date] = PreviousDate
    )
RETURN
    CurrentDateValue - PreviousDateValueThen create a measure to count the rows where the calculated column is less than 0
CountlessthazeroValues = 
CALCULATE(
    COUNTROWS('DataTable'),
    FILTER(
        'DataTable',
        'DataTable'[CurrentDateValueMPreviousDateValue] < 0
    )
)
Let me know if it works
Hi @Fighting21
1st create calculated column that computes the difference for each row
CurrentDateValueMPreviousDateValue = 
VAR CurrentDate = 'DataTable'[Date]
VAR PreviousDate =
    CALCULATE(
        MAX('DataTable'[Date]),
        FILTER(
            ALL('DataTable'),
            'DataTable'[Date] < CurrentDate
        )
    )
VAR CurrentDateValue =
    CALCULATE(
        SUM('DataTable'[Value]),
        'DataTable'[Date] = CurrentDate
    )
VAR PreviousDateValue =
    CALCULATE(
        SUM('DataTable'[Value]),
        'DataTable'[Date] = PreviousDate
    )
RETURN
    CurrentDateValue - PreviousDateValueThen create a measure to count the rows where the calculated column is less than 0
CountlessthazeroValues = 
CALCULATE(
    COUNTROWS('DataTable'),
    FILTER(
        'DataTable',
        'DataTable'[CurrentDateValueMPreviousDateValue] < 0
    )
)
Let me know if it works
Hi @Fighting21
Please provide a workable sample data and your expected result from that. It is hard to figure out what you want to achieve from the description alone.
 
					
				
				
			
		
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 | 
|---|---|
| 91 | |
| 49 | |
| 37 | |
| 31 | |
| 30 |