Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SBethell
Regular Visitor

Dynamically Calculating minimum value

I'm trying to visualise the movement of applications thorugh our system, using a dataset that produces a record for every interaction that the application has had with our system, but I only want to be counting the most recent interaction.

Column 4 in the image attached is what I need to get to, showing the smallest number grouped by application, where the Rel Date is at least 6, and at most 100. 

SBethell_0-1680513683529.png

 

8 REPLIES 8
SBethell
Regular Visitor

Not sure what exactly you're asking for but in the image above I need to be able to select only the most recent interaction each application has, in the example above I only want to be  counting record 3 for application A, and record 2 for application B. I'm currently using:

CALCULATE(MIN(Table[LatestRecord]),ALLEXCEPT(Table,Table[AppID],Table[Rel Date]))
This works when there are no filters on relative date, however when I use a slicer to change the available relatives dates it stops working, and shows each record as the value. If I take out the Table[Rel Date] from the function, it always shows the final record regardless of the relative date.

@SBethell 

Please try the following measure 

=
CALCULATE (
MIN ( Table[LatestRecord] ),
ALLSELECTED ( 'Table' ),
VALUES ( 'Table'[AppID] )
)

Just tried it and I'm still getting the same issue where it works for when I have nothing on my slicer but as soon as I adjust the slicer, even if it doesn't impact the application I'm using as a test it shows each record as the minimum again.

@SBethell 
Would you please provide some screeshots to clarify your point?

SBethell_0-1681197343604.png

SBethell_1-1681197388622.png

Image 1 is when there is no filter on date, LastSSCandInteraction is the measure Ihad at the start, measure is the the DAX you suggested. Image 2 is when I have a filter on relative date which does not affect any of the interactions on the application

@SBethell 
Not sure if I fully understand, However, please try

=
CALCULATE (
    MIN ( Table[LatestRecord] ),
    ALL ( 'Table' ),
    VALUES ( 'Table'[AppID] )
)

or

=
CALCULATE ( 
    MIN ( Table[LatestRecord] ), 
    ALLEXCEPT ( 'Table', 'Table'[AppID] ) 
)

Unfortunately still no dice, but I realised I didn't share the formula I've worked out in excel. MINIFS($B$2:$B$21,$C$2:$C$21,">="&$I$2,$C$2:$C$21,"<="&$J$2,$A$2:$A$21,A2)

tamerj1
Super User
Super User

Hi @SBethell 
Please clarify further

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.