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.
Hello,
I want to create a DAX that will execute a expression based on the table rows. My measure is
Thanks
Solved! Go to Solution.
Please see this post to learn more about KEEPFILTERS().
https://www.sqlbi.com/articles/using-keepfilters-in-dax/
One of the example in that article shows the syntax like below. Is that how you used it?
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Your calculate filter on Infinity[Test] is overwriting the filter provided by the row on the table visual. Wrap it in
KEEPFILTERS() to get your desired effect.
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
This is the error I get when wrapping measure in KeepFilters
KEEPFILTERS function can only be used as a top level filter argument of CALCULATE and CALCULATETABLE or with a table argument of a function performing a table scan.
Please see this post to learn more about KEEPFILTERS().
https://www.sqlbi.com/articles/using-keepfilters-in-dax/
One of the example in that article shows the syntax like below. Is that how you used it?
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi @Anonymous
try more easy
Over Spec =
CALCULATE( COUNTROWS(Infinity), Infinity[Value] > 3.6, Infinity[Test] = "Shoulder Weight")
+
CALCULATE( COUNTROWS(Infinity), Infinity[Value] > 1.4, Infinity[Test] = "Body Weight")
The result using that measure is
I need the over column to calculate based on test column
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.