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
ABC11
Helper III
Helper III

Incorrect matrix subtotal

Hi,

Instead of sum I amgetting max value in subtotal in my matrix. Anyone can help me here.

I am doing following sum of calculation for LINENUM distinctcount.

 
sum Count of LINENUM = sumx(values(LEM_STATUS_ALL_V[WAPPRDATE].[Date]),
CALCULATE(
    DISTINCTCOUNT('LEM_STATUS_ALL_V'[LINENUM]),
    'LEM_STATUS_ALL_V'[LEMNUM]
))

ABC11_0-1648575503190.png

 

Thanks

ABC1

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @ABC11 

you may try 

sum Count of LINENUM =
SUMX (
    SUMMARIZE (
        LEM_STATUS_ALL_V,
        LEM_STATUS_ALL_V[WAPPRDATE],
        LEM_STATUS_ALL_V[WAPPRBY],
        LEM_STATUS_ALL_V[SUBMITBY]
    ),
    CALCULATE (
        DISTINCTCOUNT ( 'LEM_STATUS_ALL_V'[LINENUM] ),
        'LEM_STATUS_ALL_V'[LEMNUM]
    )
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @ABC11 

you may try 

sum Count of LINENUM =
SUMX (
    SUMMARIZE (
        LEM_STATUS_ALL_V,
        LEM_STATUS_ALL_V[WAPPRDATE],
        LEM_STATUS_ALL_V[WAPPRBY],
        LEM_STATUS_ALL_V[SUBMITBY]
    ),
    CALCULATE (
        DISTINCTCOUNT ( 'LEM_STATUS_ALL_V'[LINENUM] ),
        'LEM_STATUS_ALL_V'[LEMNUM]
    )
)

Thanks Tamerj1.

Its worked

 

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.