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
Anonymous
Not applicable

I need to group data by version.

Hi,

I need to group data below in screen shot.  i have two columns  application and version columns in table. version by app.PNG

 

here one applictaions have many versions and one version have many devices listed.  I need outputs like application, version and  Devices total count.

application ID versioncount 
commicrosoft.officeoutlookIOS4.3.1 (2915218)1000
commicrosoft.officeoutlookIOS4.2125.0 (9055108)150
commicrosoft.officeoutlookAndroid4.0.533000
commicrosoft.officeoutlookAndroid3.0.55500

 

Here there are multiple versions and one versions have multiple devices connected. I need the count of devices for each version.

1 ACCEPTED SOLUTION

Hi @Anonymous ,

You can update your code with below.

Count_of_app_ver = 
CALCULATE (
    COUNTROWS ( version_data ),
    FILTER (
        version_data,
        version_data[applicationversion] = MAX ( version_data[applicationversion] )
            && (version_data[mamapplicationid] in  {"com.microsoft.andriod","com.microsoft.powerpoint" } )
    )

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

3 REPLIES 3
Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

You can create a measure with below code:-

 

Count_of_app_ver =
CALCULATE (
    COUNTROWS ( version_data ),
    FILTER (
        version_data,
        version_data[applicationversion] = MAX ( version_data[applicationversion] )
            && version_data[mamapplicationid] = MAX ( version_data[mamapplicationid] )
    )
)

 

My data table:-

Samarth_18_0-1627060529158.png

Output:-

Samarth_18_1-1627060554777.png

 

Thanks

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

If i want to filter the measure to get data only for com.microsoft.andriod and com.microsoft.powerpoint.

 

how to do it.

Hi @Anonymous ,

You can update your code with below.

Count_of_app_ver = 
CALCULATE (
    COUNTROWS ( version_data ),
    FILTER (
        version_data,
        version_data[applicationversion] = MAX ( version_data[applicationversion] )
            && (version_data[mamapplicationid] in  {"com.microsoft.andriod","com.microsoft.powerpoint" } )
    )

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

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.