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
GM17
Frequent Visitor

Total not working

Hi All,

 

I measure column below in a table-

IF(ISBLANK(CALCULATE(DISTINCTCOUNT(VW_PRS_LCS_Activity[LCSACT_ActID]),FILTER(VW_PRS_LCS_Activity,(VW_PRS_LCS_Activity[LCSACT_ActName] <> "Development Work" && VW_PRS_LCS_Activity[LCSACT_ActPastDue]>0)))),0,CALCULATE(DISTINCTCOUNT(VW_PRS_LCS_Activity[LCSACT_ActID]),FILTER(VW_PRS_LCS_Activity,(VW_PRS_LCS_Activity[LCSACT_ActName] <> "Development Work" && VW_PRS_LCS_Activity[LCSACT_ActPastDue]>0))))

 

 

 

The details row in the table gives the correct result while Total is not returining the correct value? Please suggest the way so that total returns the correct value.

 

1 REPLY 1
Eric_Zhang
Employee
Employee


@GM17 wrote:

Hi All,

 

I measure column below in a table-

IF(ISBLANK(CALCULATE(DISTINCTCOUNT(VW_PRS_LCS_Activity[LCSACT_ActID]),FILTER(VW_PRS_LCS_Activity,(VW_PRS_LCS_Activity[LCSACT_ActName] <> "Development Work" && VW_PRS_LCS_Activity[LCSACT_ActPastDue]>0)))),0,CALCULATE(DISTINCTCOUNT(VW_PRS_LCS_Activity[LCSACT_ActID]),FILTER(VW_PRS_LCS_Activity,(VW_PRS_LCS_Activity[LCSACT_ActName] <> "Development Work" && VW_PRS_LCS_Activity[LCSACT_ActPastDue]>0))))

 

 

 

The details row in the table gives the correct result while Total is not returining the correct value? Please suggest the way so that total returns the correct value.

 


@GM17

I don't find something wrong with that measure. As to the incorrect Total, could you post any sample data and snapshots? By the way, for better readability, the measure can be 

your measure =
VAR value =
    CALCULATE (
        DISTINCTCOUNT ( VW_PRS_LCS_Activity[LCSACT_ActID] ),
        FILTER (
            VW_PRS_LCS_Activity,
            ( VW_PRS_LCS_Activity[LCSACT_ActName] <> "Development Work"
                && VW_PRS_LCS_Activity[LCSACT_ActPastDue] > 0 )
        )
    )
RETURN
    IF ( ISBLANK ( value ), 0, value )

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.