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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Phil11
Frequent Visitor

Lookupvalue min ?

Hi, 

 

I'm trying to calculate a column of min and max value with many conditions and report this value in theses columns 

 

Ex : Agent 1 have many login for the day 16 , I would like to report in Login Colum the first login of the day

So I need to take care about Agent, day and Column1 

 

Have you got any ideas ? 

 

Thanks you so much for your help.

 

Phil

Capture.JPG

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

try this, probably you will have to change the Name column to fit your data

login =
VAR CurrentAgent = 'event storage copie'[Name]
VAR CurrentDate = 'event storage copie'[Date]
RETURN
    CALCULATE (
        MIN ( 'event storage copie'[H] ),
        FILTER (
            'event storage copie',
            'event storage copie'[Column1] = "LOGIN"
                && 'event storage copie'[Name] = CurrentAgent
                && 'event storage copie'[Date] = CurrentDate
        )
    )


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

3 REPLIES 3
Phil11
Frequent Visitor

I have already tried this but not working: 

 

login = CALCULATE(min('event storage copie'[H];filter(CALCULATETABLE('event storage copie');'esirius agentconfig'[Agent]='event storage copie'[Agent]&'event storage copie'[date]='event storage copie'[date])))

 

and this  :

Login =
CALCULATE (
FIRSTNONBLANK ( 'event storage copie'[h]; TRUE () );
FILTER (
'event storage copie';
'event storage copie'[Column1] = "LOGIN"
&& 'event storage copie'[h] = MIN('event storage copie'[h]) && 'event storage copie'[Agent]='event storage copie'[Agent] && 'event storage copie'[Date2]='event storage copie'[Date2]
)
)

Stachu
Community Champion
Community Champion

try this, probably you will have to change the Name column to fit your data

login =
VAR CurrentAgent = 'event storage copie'[Name]
VAR CurrentDate = 'event storage copie'[Date]
RETURN
    CALCULATE (
        MIN ( 'event storage copie'[H] ),
        FILTER (
            'event storage copie',
            'event storage copie'[Column1] = "LOGIN"
                && 'event storage copie'[Name] = CurrentAgent
                && 'event storage copie'[Date] = CurrentDate
        )
    )


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Phil11
Frequent Visitor

Great idea !! Thanks a lot it's working  🙂 

 

Smiley Very Happy

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.