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

Total Sumx of Tickets State with filtered when they completed

Hi,

 

i am struggeling since hours with one Problem and wrong total by using Sumx.

I have a Dateset that contains for each Task each State and when the State started and end.

I want to make a kind of Process Analyisis so i wan to calculate the Average of States that all the Task has, but only when the Task is been completed.

My Dataset ist row Based, so that i have for each Task and State an own row.

I tried the following measueres.

To get the amount of Tasks per Ticket

_States_per_Ticket (completed) = SUMX('Tabelle1 (2)';CALCULATE(COUNT('Tabelle1 (2)'[State]);FILTER('Tabelle1 (2)';Max('Tabelle1 (2)'[Start Date State])&&'Tabelle1 (2)'[State]="completed")))
 
to get the amount of all Tickets that are completed 
_Anz Tickets (completed) = CALCULATE(DISTINCTCOUNT('Tabelle1 (2)'[Task]);'Tabelle1 (2)'[State]="completed")
 
 
In an table view the calculation are right, for task 815 there are 4 States and for 819 there are 7. 850 will not be counted because it is not completed. But in Sum PBI show 26, instead of 11. So that the average Divide(26,2) will show 13 instead of 5,5 (11/2)
 
Unbenannt.PNGUnbenannt2.PNG
 
 
 
 
What could be the Problem ?


 
thx for help
1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@BileMG ,

 

You may modify the first measure using dax below:

_States_per_Ticket (completed) =
SUMX (
    'Tabelle1 (2)';
    CALCULATE (
        COUNT ( 'Tabelle1 (2)'[State] );
        FILTER (
            ALLEXCEPT ( 'Tabelle1 (2)'; 'Tabelle1 (2)'[Task] );
            MAX ( 'Tabelle1 (2)'[Start Date State] )
                && 'Tabelle1 (2)'[State] = "completed"
        )
    )
)

Community Support Team _ Jimmy Tao

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

1 REPLY 1
v-yuta-msft
Community Support
Community Support

@BileMG ,

 

You may modify the first measure using dax below:

_States_per_Ticket (completed) =
SUMX (
    'Tabelle1 (2)';
    CALCULATE (
        COUNT ( 'Tabelle1 (2)'[State] );
        FILTER (
            ALLEXCEPT ( 'Tabelle1 (2)'; 'Tabelle1 (2)'[Task] );
            MAX ( 'Tabelle1 (2)'[Start Date State] )
                && 'Tabelle1 (2)'[State] = "completed"
        )
    )
)

Community Support Team _ Jimmy Tao

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

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.