Latest Enterprise DNA Initiatives

Incorrect sum and average, display count and average

Hi PowerBi Superstars,

Hope you have a good midweek. I have table displaying TopN with its company name and type of jobs.

On the topN, it is displaying the incorrect sum and the rest of the sum of topN were blanks.

Also, when I try to display the count of each jobs and its average, it disregards the topN value. See attached sample file and the measures that I have used.

Thank you for this wonderful community. Hope I’ll contribute as well as I progress.

Measure for Counting jobs

# of Jobs by Group Owner = SUMX(
SUMMARIZE(FactFinalisedInvoicesDetailed, FactFinalisedInvoicesDetailed[Invoice Type],
    "Jobs", [Rank by Invoice Type] ),
    [Jobs] )

Displaying average of jobs

Average Total Invoice By Invoice Type = AVERAGEX( VALUES(FactFinalisedInvoicesDetailed[Invoice Type]), [Total Invoice] )

Rankx measure

   Rank by Invoice Type = 
RANKX(
ALL(GroupedFinalisedInvoices[Group Owner]),
    CALCULATE( [Total Invoice],
        ALLSELECTED(FactFinalisedInvoicesDetailed[Invoice Type] ) ), , DESC )

topN measure

   Total Invoice By Rank Group = 
SUMX(
KEEPFILTERS(
    FILTER(
        ALLSELECTED( FactFinalisedInvoicesDetailed[Invoice Type] ), 
        COUNTROWS(
            FILTER(
                'Customer Rank',
                [Rank by Invoice Type] >= 'Customer Rank'[Min Rank]
                && [Rank by Invoice Type] <= 'Customer Rank'[Max Rank] )
        ) > 0
    )
), [Total Invoice]

)

Displaying count of jobs - where is the next topN?

Displaying average of jobs - incorrect average and the next topN were missing

Hi @ronald_balza , we noticed you posted a modified version of the same questions as this original post:

We are marking this thread as “Solved” since your original query was solved by @Harsh on the other thread. If you have further inquiry for another topic, kindly create a new thread.

1 Like