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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Lookupvalue and filter.

Hi everybody, i have some question about this.

I have a table that contain multiple columns (Market, Despatch, etapa1).  i have 1 MARKET, and a lot of despatch. 

Snahass_2-1658957156460.png

 

I need to find de max value of "ETAPA 1" Referred to each "DESPATCH" for example, in this case

Snahass_1-1658957147691.png

And then calculate the addition with the max values

 

 

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

Thanks for reaching out to us.

>> And then calculate the addition with the max values

You can try this, create the 2 measures

Max_PerMarDes = 
var _maxEta=CALCULATE(MAX('Table'[Etapa1]),ALLEXCEPT('Table','Table'[Market],'Table'[Despatch]))
return IF(MIN('Table'[Etapa1])=_maxEta,_maxEta)
sum = SUMX('Table',[Max_PerMarDes])

result

vxiaotang_0-1659320484737.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating  new columns.

 

Untitled.png

 

MAX Etapa1 CC = 
VAR _maxetapa1 =
    MAXX (
        FILTER (
            Data,
            Data[Market] = EARLIER ( Data[Market] )
                && Data[Despatch] = EARLIER ( Data[Despatch] )
        ),
        Data[Etapa1]
    )
VAR _condition = Data[Etapa1] = _maxetapa1
RETURN
    DIVIDE ( _condition, _condition ) * _maxetapa1

 

MAX Etapa1 CC =
VAR _maxetapa1 =
    MAXX (
        FILTER (
            Data,
            Data[Market] = EARLIER ( Data[Market] )
                && Data[Despatch] = EARLIER ( Data[Despatch] )
        ),
        Data[Etapa1]
    )
VAR _condition = Data[Etapa1] = _maxetapa1
RETURN
    DIVIDE ( _condition, _condition ) * _maxetapa1

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

Thanks for reaching out to us.

>> And then calculate the addition with the max values

You can try this, create the 2 measures

Max_PerMarDes = 
var _maxEta=CALCULATE(MAX('Table'[Etapa1]),ALLEXCEPT('Table','Table'[Market],'Table'[Despatch]))
return IF(MIN('Table'[Etapa1])=_maxEta,_maxEta)
sum = SUMX('Table',[Max_PerMarDes])

result

vxiaotang_0-1659320484737.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Users online (27)