Forum Discussion

InfiniteSheldon's avatar
InfiniteSheldon
Frequent Visitor
3 years ago
Solved

Count of Total Rows Using Filter Function Based on the Value of Multiple Measures

Plase see the screenshot below. Could someone please tell me how to correct the DAX to make the table visual result match the card visual result? Card visual result should show "1" for this scenario. I have also attached the PBI file. 

 

 

 

Basically, what is wrong witht the DAX below?

 

Total CV Increase W/O EAC Increase where there is incurred cost =

CALCULATE(
    COUNT(Project[Project #]),
    FILTER(Project,
    Project[Total Actual Cost] <> 0 &&
    [Total CV Change] > 0 &&
    [Total EAC Change] <= 0
    )
)
 
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi InfiniteSheldon 

    You can refer to the following mesaure

    Total CV Inc W/O EAC Inc =
    VAR test =
        SUMMARIZE ( ALLSELECTED ( Project ), [Project #] )
    RETURN
        COUNTROWS (
            FILTER (
                test,
                [Total CV Change] > 0
                    && [Total EAC Change] <= 0
                    && SUM ( Project[Total Actual Cost] ) <> 0
            )
        )
    

     

    Best Regards!

    Yolo Zhu

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

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi InfiniteSheldon 

    You can refer to the following mesaure

    Total CV Inc W/O EAC Inc =
    VAR test =
        SUMMARIZE ( ALLSELECTED ( Project ), [Project #] )
    RETURN
        COUNTROWS (
            FILTER (
                test,
                [Total CV Change] > 0
                    && [Total EAC Change] <= 0
                    && SUM ( Project[Total Actual Cost] ) <> 0
            )
        )
    

     

    Best Regards!

    Yolo Zhu

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

    • InfiniteSheldon's avatar
      InfiniteSheldon
      Frequent Visitor

      Thank you so much Yolo! This is exactly what I was looking for.