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.
Hi There,
I have been struggling to get the max and mins from a calculated table through a measure.
I am looking to group an imported table by a unique key and then get the max and min values. and I am getting this through the following:
Solved! Go to Solution.
I was able to work out my problem - was more to do with where I was creating the new table / column and how my visuals would be filtering. Below is the DAX which resolved it:
I was able to work out my problem - was more to do with where I was creating the new table / column and how my visuals would be filtering. Below is the DAX which resolved it:
I have done some further testing and found out that when I filter directly to the 'WIP Entries' table the above dax works as expected. The problem seems to be when I am filtering another table which has a relationship to the 'WIP Entries' Table it doesn't apply the filter.
Any thoughts on how to work around this?
Thanks
Scott
It seems that you are trying to create a dynamic calculated table that updates based on the filters applied to the 'WIP Entries' table. One way to achieve this is to use the ALLSELECTED function in your _group variable to consider the filters applied to the 'WIP Entries' table. Here is an example of how you can modify your _group variable to achieve this:
var _group = GROUPBY( ALLSELECTED('WIP Entries'), 'WIP Entries'[zLinkKey], "Billing Group Natural Profit", SUMX( CURRENTGROUP(), 'WIP Entries'[Natural Profit] ) )
In this example, the ALLSELECTED function is used to consider the filters applied to the 'WIP Entries' table when grouping the data. This should update the calculated table based on the filters applied to the 'WIP Entries' table, and the _minX and _maxX variables should also update accordingly.
Best regards,
Johannes
Hi Johannes,
Thanks for the response but the ALLSELECTED() function was already in my DAX and still not filtering per the slicers.
I tried using the SUMMARIZE function as an alternative to the GROUP function and while that seemed to dynamically update I wasn't able to get the ultimate min and max of the dataset, it would just return the min and max of each row.
Any other thoughts?
Thanks
Scott
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.