Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Count of Measure

Hi, 

Measure Applications counts the number of applications, ProgPerSchool measures distinct program in a school, AppPerSchool measures applications for a school, and AppAverageSchool calculate an average number of applications for a school.

 

 - Want to create a measure that counts the number of programs that receive applications below and above AppAverageSchool.

- Want to create a list and graph of such program

-  link of pbix file Count of Measure Issue

 

  • Hi Anonymous ,

     

    Try to add the following two measures:

     

    Aplications Below = 
    COUNTX (
        FILTER (
            SUMMARIZE (
                ALL ( 'Dim Programs'[Program Name] );
                'Dim Programs'[Program Name];
                "ApplicationCount"; [Applications]
            );
            [ApplicationCount] < [AppAverageSchool]
        );
        [ApplicationCount]
    )
    
    Aplications Above= 
    COUNTX (
        FILTER (
            SUMMARIZE (
                ALL ( 'Dim Programs'[Program Name] );
                'Dim Programs'[Program Name];
                "ApplicationCount"; [Applications]
            );
            [ApplicationCount] > [AppAverageSchool]
        );
        [ApplicationCount]
    )

    Regards,

    MFelix

5 Replies

  • Hi Anonymous ,

     

    Try to add the following two measures:

     

    Aplications Below = 
    COUNTX (
        FILTER (
            SUMMARIZE (
                ALL ( 'Dim Programs'[Program Name] );
                'Dim Programs'[Program Name];
                "ApplicationCount"; [Applications]
            );
            [ApplicationCount] < [AppAverageSchool]
        );
        [ApplicationCount]
    )
    
    Aplications Above= 
    COUNTX (
        FILTER (
            SUMMARIZE (
                ALL ( 'Dim Programs'[Program Name] );
                'Dim Programs'[Program Name];
                "ApplicationCount"; [Applications]
            );
            [ApplicationCount] > [AppAverageSchool]
        );
        [ApplicationCount]
    )

    Regards,

    MFelix

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi MFelix , Thanks for the help.

       

      Can you please guide me on how to eliminate programs that have zero applications from the distinct count and measure.

       

      • MFelix's avatar
        MFelix
        Icon for Super User rankSuper User

        Hi Anonymous ,

         

        You need to add another parameter on your filter try the following:

         

        Aplications Above= 
        COUNTX (
            FILTER (
                SUMMARIZE (
                    ALL ( 'Dim Programs'[Program Name] );
                    'Dim Programs'[Program Name];
                    "ApplicationCount"; [Applications]
                );
                [ApplicationCount] > [AppAverageSchool]  || [ApplicationCount] <> BLANK()
            );
            [ApplicationCount]
        )

        Regards,

        MFelix