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.
Hello,
I have two different measures:
pcount = distinctcount(data[portfolio])
hg = divide(sum(data[amount]), sum(data[realizedAmount]))
hg_x = divide(sum(data[amount]), sum(data[realizedAmount2]))
What i want to achieve is to create two new measures. One gets the count of portfolios that have hg>=1 and other one gets the count of portfolios that have hg_x>=1.
I've tried to create formula like below but it gives me an error.
measure = calculate(pcount, hg>=1)
Any help would be appreciated.
Solved! Go to Solution.
How about this?
COUNTROWS ( FILTER ( DISTINCT ( data[portfolio] ), [hg] >= 1 ) )
This creates a list of distinct portfolios, filters for the specified condition, and counts how many are left.
Hi @Anonymous ,
Whether the advice given by @AlexisOlson @philouduv has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.
Looking forward to your feedback.
Best Regards,
Henry
How about this?
COUNTROWS ( FILTER ( DISTINCT ( data[portfolio] ), [hg] >= 1 ) )
This creates a list of distinct portfolios, filters for the specified condition, and counts how many are left.
Hey @Anonymous ,
I do not have your data model and neither your data columns but I am guessing that you have a portfolio name and/or id with an amount and amount_realised 1 and amount_realised 2
If I am correct, I am advicing you to create 2 new column(hg and hg_x) like this:
hg_value = data[amount] / data[realised_amount1]
do the same with hg_x
Then create a new measure :
hg_measure =