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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Jorjor
Frequent Visitor

Getting unique number for Item ID for a measure

Hi,

I'm having an issue getting the QTY for each unique ID combo using a meassure. Is there any help?

 

Current Code:

QTY_ = SUMX(FILTER(table1(ID1)=MAX([ID1]) && Table 1(ID2)=MAX([ID2])),[QTY_])

Jorjor_0-1718213508047.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @Jorjor 

You can try the following DAX expression:

QTY_Combined = 
SUMX(
    SUMMARIZE(
        'Table', 
        'Table'[ID1], 
        'Table'[ID2], 
        "TotalQty", SUM('Table'[QTY])
    ), 
    [TotalQty]
)

 

Then put it in view, here is my preview:

vyohuamsft_0-1718243328158.png

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi, @Jorjor 

You can try the following DAX expression:

QTY_Combined = 
SUMX(
    SUMMARIZE(
        'Table', 
        'Table'[ID1], 
        'Table'[ID2], 
        "TotalQty", SUM('Table'[QTY])
    ), 
    [TotalQty]
)

 

Then put it in view, here is my preview:

vyohuamsft_0-1718243328158.png

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

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

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.