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.
+ I edited question
I made measure _CurrentDataValueMPreviousDateValue
and i try to count rows that _CurrentDataValueMPreviousDateValue is minus
so i tried
Solved! Go to Solution.
Hi @Fighting21
You raw data don't have negative and after summarization, measure have negative. So, I think you need to summarize first and then compare with measure and count rows.
You can try the below code, if it is meets your goal:
CountNegetive =
VAR SummarizedTable =
SUMMARIZE(
'DataTable',
'DataTable'[Category],
'DataTable'[SubCategory],
'DataTable'[Date],
"TotalValue", SUM('DataTable'[Value])
)
VAR CountNegativeRows =
SUMX(
SummarizedTable,
IF(
[_CurrentDateValueMPreviousDateValue] < 0,
1,
0
)
)
RETURN
CountNegativeRows
I found this result, though I don't know it is the desired result what you want to achieve or not:
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz
Hi @Fighting21
You raw data don't have negative and after summarization, measure have negative. So, I think you need to summarize first and then compare with measure and count rows.
You can try the below code, if it is meets your goal:
CountNegetive =
VAR SummarizedTable =
SUMMARIZE(
'DataTable',
'DataTable'[Category],
'DataTable'[SubCategory],
'DataTable'[Date],
"TotalValue", SUM('DataTable'[Value])
)
VAR CountNegativeRows =
SUMX(
SummarizedTable,
IF(
[_CurrentDateValueMPreviousDateValue] < 0,
1,
0
)
)
RETURN
CountNegativeRows
I found this result, though I don't know it is the desired result what you want to achieve or not:
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz
Hi,
Please try something like below if it works.
expected result measure: =
VAR _t =
FILTER ( DataTable, [_CurrentDataValueMPreviousDateValue] < 0 )
RETURN
COUNTROWS ( _t )
Sorry, i changed my question.
You could write this
Countrows(filter(DataTable,Datatable[value]<0))
Sorry, i changed my question.
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.
User | Count |
---|---|
10 | |
7 | |
5 | |
4 | |
3 |
User | Count |
---|---|
13 | |
11 | |
9 | |
8 | |
8 |