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
erikajain02
Resolver I
Resolver I

DistinctCount with Max Users in Particular field

Hi Team,

 

I am trying to find out the State with max users for each  Operator.

Desired Output : Airtel : Maharastra

                          BSNL :  Uttar Pradesh

                          Vodafone : Uttar Pradesh

 

 

Sample Data : 

OperatorIn Out TravellingNetwork TypeRatingCall Drop CategoryLatitudeLongitudeState Name
RJioTravelling4G2Poor Voice Quality28.5935977.16427589NCT
RJioTravelling4G5Satisfactory28.5936377.1642034NCT
RJioIndoor4G5Satisfactory25.6258985.09438546Bihar
RJioIndoor4G5Satisfactory25.6258985.09438546Bihar
RJioOutdoor4G2Poor Voice Quality21.3749281.66704286Chhattisgarh
RJioOutdoor4G1Call Dropped28.607677.02321833NCT
RJioOutdoor4G4Satisfactory12.3629276.6441789Karnataka
RJioOutdoor4G5Satisfactory28.1208777.3307241Haryana
RJioOutdoor4G1Poor Voice Quality17.2542382.53787922Andhra Pradesh
RJioTravelling4G1Poor Voice Quality17.4537978.56600319Telangana
RJioIndoor4G1Call Dropped28.607677.02321833NCT
BSNLIndoorUnknown2Poor Voice Quality26.8491580.956541Uttar Pradesh
BSNLIndoorUnknown2Poor Voice Quality26.8491580.956541Uttar Pradesh
BSNLIndoor3G3Satisfactory28.9658877.7362908Uttar Pradesh
AirtelOutdoor4G4Satisfactory11.242277.2331508Tamil Nadu
AirtelOutdoor4G4Satisfactory11.242277.2331508Tamil Nadu
AirtelIndoor3G1Call Dropped13.0105477.703192Karnataka
RJioTravelling4G2Poor Voice Quality28.663577.26747369NCT
VodafoneIndoor4G5Satisfactory28.6223577.3671665Uttar Pradesh
VodafoneIndoorUnknown5Satisfactory28.6223577.3671665Uttar Pradesh
VodafoneIndoorUnknown5Satisfactory28.6223577.3671665Uttar Pradesh
VodafoneIndoorUnknown5Satisfactory28.5744477.3537819Uttar Pradesh
VodafoneIndoor4G5Satisfactory28.6190477.4252032Uttar Pradesh
RJioOutdoor4G1Poor Voice Quality20.8224485.28371866Odisha
AirtelIndoorUnknown2Poor Voice Quality19.4082972.8387402Maharashtra
AirtelIndoor2G2Poor Voice Quality19.4082972.8387402Maharashtra
BSNLOutdoor4G4Satisfactory10.4878676.96689751Tamil Nadu
AirtelIndoorUnknown2Poor Voice Quality19.2842672.94790689Maharashtra
AirtelIndoorUnknown2Poor Voice Quality19.2842672.94790689Maharashtra
AirtelIndoorUnknown2Poor Voice Quality19.4082972.8387402Maharashtra
AirtelIndoor2G2Poor Voice Quality19.4082972.8387402Maharashtra
AirtelTravelling3G1Call Dropped19.1122972.91005411Maharashtra
AirtelOutdoor3G2Poor Voice Quality19.2842672.94790689Maharashtra
6 REPLIES 6
v-yulgu-msft
Employee
Employee

Hi @erikajain02,

 

New a calculated table:

Result output =
SUMMARIZE (
    FILTER (
        ADDCOLUMNS (
            Table,
            "Users", CALCULATE (
                COUNT ( Table[State Name] ),
                ALLEXCEPT ( Table, Table[Operator], Table[State Name] )
            ),
            "Max Users", CALCULATE (
                MAXX (
                    SUMMARIZE (
                        Table,
                        Table[Operator],
                        Table[State Name],
                        "Use", COUNT ( Table[State Name] )
                    ),
                    [Use]
                ),
                ALLEXCEPT ( Table, Table[Operator] )
            )
        ),
        [Users] = [Max Users]
    ),
    Table[Operator],
    Table[State Name]
)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yulgu-msft

 

Can u share the application Please?

I guess I do not have permissions to upload the file.

Try This Link : https://app.powerbi.com/groups/me/reports/d6cf5f96-bcda-4a29-b4c0-47858ea3bda8?ctid=a45fe71a-f480-4e...

Hey @v-yulgu-msft,

issue.PNG

It is giving me syntax error.

Hey @v-yulgu-msft,

 

Is there a shorter way to do this ?

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.