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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi
I want a measure (to add to a card) that gives me the number of distinct organisations that have income less than expected above a user set criteria for more than three instances;
I have succesfully got a measure that goves me the number of distinct organisations that have one or more instances that meet the criteria, but I now want something that tells me how many have three or more;
My successful measures are:
Solved! Go to Solution.
Thanks Vinay
I (with some advice from AI) have resolved using two measures:
M_MonthsAboveThreshold =
VAR MonthsAboveThreshold =
SUMX(
FILTER(DeclarationAssessment, DeclarationAssessment[M_%IEThresholdMet] = 1),
1
)
RETURN
MonthsAboveThreshold
M_ContractorsAbove3Months =
VAR ContractorsAboveThreshold =
SUMX (
VALUES(DeclarationAssessment[Contractor]),
IF(
CALCULATE(
COUNTROWS(FILTER(DeclarationAssessment, DeclarationAssessment[M_%IEThresholdMet] = 1))
) > 3,
1,
0
)
)
RETURN
ContractorsAboveThreshold
Hi, thanks bhanu_gautam; I initially got an error ('A single value for column 'FlagIlessthanE' in table 'DeclarationAssessment' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.') which I got around by adding Max(DeclarationAssessment[FlagIlessthanE]) and the same for [IlessthanE%]; but gave the result of 145 contractors and I know that the number that have more than three months that are more than meet or exceed the threshold is 22;
Thank you for your help though 🙂
Hi @RowenaJones,
your logic might be counting incorrectly.
may be COUNTROWS(ContractorMonths) might be over-counting or missing valid months due to improper filtering.
Regards,
Vinay Pabbu
Thanks Vinay
I (with some advice from AI) have resolved using two measures:
M_MonthsAboveThreshold =
VAR MonthsAboveThreshold =
SUMX(
FILTER(DeclarationAssessment, DeclarationAssessment[M_%IEThresholdMet] = 1),
1
)
RETURN
MonthsAboveThreshold
M_ContractorsAbove3Months =
VAR ContractorsAboveThreshold =
SUMX (
VALUES(DeclarationAssessment[Contractor]),
IF(
CALCULATE(
COUNTROWS(FILTER(DeclarationAssessment, DeclarationAssessment[M_%IEThresholdMet] = 1))
) > 3,
1,
0
)
)
RETURN
ContractorsAboveThreshold
@RowenaJones Thanks for sharing, Can you please accept your own post as solution it will be helpful for other members of the community who have similar problems as yours to solve it faster.
Regards,
Vinay Pabbu
Hi @RowenaJones,
Thanks @bhanu_gautam for Addressing the issue.
we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Regards,
Vinay Pabbu
@RowenaJones , Try using
DAX
M_ilessE3plusMeetsThreshold =
VAR ContractorMonths =
FILTER(
ADDCOLUMNS(
SUMMARIZE(
DeclarationAssessment,
DeclarationAssessment[Contractor],
DeclarationAssessment[MonthStart]
),
"@MeetsThreshold",
DeclarationAssessment[FlagIlessthanE] = 1 &&
DeclarationAssessment[IlessthanE%] >= 'Percentage Threshold'[Percentage Threshold Value]
),
[@MeetsThreshold] = TRUE
)
VAR ContractorCounts =
ADDCOLUMNS(
SUMMARIZE(
ContractorMonths,
DeclarationAssessment[Contractor]
),
"@ThresholdMonths",
COUNTROWS(
FILTER(
ContractorMonths,
DeclarationAssessment[Contractor] = EARLIER(DeclarationAssessment[Contractor])
)
)
)
RETURN
CALCULATE(
DISTINCTCOUNT(DeclarationAssessment[Contractor]),
FILTER(
ContractorCounts,
[@ThresholdMonths] > 3
)
)
Proud to be a Super User! |
|
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.