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

View all the Fabric Data Days sessions on demand. View schedule

Reply
neto22
New Member

Sum Distinct with condition

Hello guys,

 

Qlik has a language called set analysis, which allows you to create formulas through conditions.

 

SUM({$<[Limit Flg] = {'S'}>}DISTINCT(NUM(CEIL([Last Original Limit]))))))

 

I'm trying to reproduce the same concept in DAX in PBI, but so far I haven't been successful.

 

Can someone help me?

 

Thanks 😄

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @neto22 ,

 

I try to learn set analysis in Qlik and understand it's calcualte logic by myself. And I think you are trying to sum the [Last Original Limit] with out duplicates (Distinct) with the condition that [Limit Flg] = "S".

I suggest you to try this code.

My Sample:

RicoZhou_0-1656574435154.png

Measure:

Convert the code = 
SUMX (
    SUMMARIZE (
        FILTER ( 'Table', 'Table'[Limit Flg] = "S" ),
        'Table'[Last Original Limit]
    ),
    [Last Original Limit]
)

Result is as below.

RicoZhou_1-1656574457755.png

 

Best Regards,
Rico Zhou

 

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

2 REPLIES 2
Anonymous
Not applicable

Hi @neto22 ,

 

I try to learn set analysis in Qlik and understand it's calcualte logic by myself. And I think you are trying to sum the [Last Original Limit] with out duplicates (Distinct) with the condition that [Limit Flg] = "S".

I suggest you to try this code.

My Sample:

RicoZhou_0-1656574435154.png

Measure:

Convert the code = 
SUMX (
    SUMMARIZE (
        FILTER ( 'Table', 'Table'[Limit Flg] = "S" ),
        'Table'[Last Original Limit]
    ),
    [Last Original Limit]
)

Result is as below.

RicoZhou_1-1656574457755.png

 

Best Regards,
Rico Zhou

 

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

 

ryan_mayu
Super User
Super User

@neto22 

could you pls provide the sample data and expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI 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.

Top Solution Authors
Top Kudoed Authors