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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

Single entry from multiple same entry

Hi All,

as per below attachment i need only those line items "Sum value (testing2)" where "dc" filed have "H&S"(both) except this if we have only "H" then its value shoud be "0"...

 

please help me to resolve this issue.

Thanks in advance.

MR007_0-1647939073461.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Anonymous,

You can try to use the following measure formula if it was suitable for your requirement:

formula =
VAR currAssignment =
    VALUES ( Table[Assignment] )
VAR summary =
    SUMMARIZE (
        FILTER (
            ALLSELECTED ( Table ),
            [DC]
                IN { "H", "S" }
                && [Assignment] IN currAssignment
        ),
        [Assignment],
        "c_DC", COUNT ( Table[DC] ),
        "s_Test2", SUM ( Table[Test2] )
    )
RETURN
    SUMX ( FILTER ( summary, [c_DC] = 2 ), [s_Test2] )

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

HI @Anonymous,

You can try to use the following measure formula if it was suitable for your requirement:

formula =
VAR currAssignment =
    VALUES ( Table[Assignment] )
VAR summary =
    SUMMARIZE (
        FILTER (
            ALLSELECTED ( Table ),
            [DC]
                IN { "H", "S" }
                && [Assignment] IN currAssignment
        ),
        [Assignment],
        "c_DC", COUNT ( Table[DC] ),
        "s_Test2", SUM ( Table[Test2] )
    )
RETURN
    SUMX ( FILTER ( summary, [c_DC] = 2 ), [s_Test2] )

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors