Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
seanrm42
Frequent Visitor

Consolidated Count

Hello fellow PBIX users.

 

I need your help for an executive request that I know is simple but has me stumped.

 

I have a large table which has a DeviceID and the AppID. For each App the Device has installed there is a row.

 

Example:

 

Device 1        App1

Device 2        App1

Device 2        App2

Device 2        App3

Device 3        App2

 

I need a summarized view that lookcs like this:

 

Count of Apps        Count of Device 

1                             2

3                             1

 

Showing the number of devices which have have a certain counts of the apps. We want to start with the devices which have the most apps installed and work our way back.

1 ACCEPTED SOLUTION

@seanrm42

 

Try this calculated Table

 

New Table =
SUMMARIZE (
    SUMMARIZE (
        TableName,
        TableName[Devices],
        "Count of Apps", COUNT ( TableName[Apps] )
    ),
    [Count of Apps],
    "Count of devices", COUNT ( TableName[Devices] )
)

View solution in original post

10 REPLIES 10
Yggdrasill
Responsive Resident
Responsive Resident

SummarizedTable = SUMMARIZE( Table1 ;
    Table1[DeviceID];
    "#ofDev" ; DISTINCTCOUNT( Table1[DeviceID] ) ;
    "#ofApps" ; COUNTROWS( Table1 ) 
)   

Then create a group from "#ofApps" and size of the bin is just 1Capture3.PNGCapture4.PNG

 

Capture2.PNG

Which of the new tables (Apps or Devices) does 'Table 1' represent in your formula?

 

When I created your formula I got 3 columns instead of 1.

Table 1 is exactly like your example and you should have 3 columns

@seanrm42

 

Try this calculated Table

 

New Table =
SUMMARIZE (
    SUMMARIZE (
        TableName,
        TableName[Devices],
        "Count of Apps", COUNT ( TableName[Apps] )
    ),
    [Count of Apps],
    "Count of devices", COUNT ( TableName[Devices] )
)
dramus
Continued Contributor
Continued Contributor

I would do it with two summary tables.

 

Devices = SUMMARIZE('Devices and Apps',[Device],"# of Apps",count('Devices and Apps'[App]))
Apps = SUMMARIZE('Devices and Apps',[App],"# of Devices",count('Devices and Apps'[Device]))

You can then join these to the main data table.

 

devices and apps.PNG

I created the two tables but am having a struggle getting to the finalized summary view my executive is looking for.

 

He wants to know how many devices have 1 app, how many devices have 2 apps, how many devices have 3 apps. and so on. The maximum number is 17 and I've compiled the data in excel wiht a pivot table just want it to refresh automatically in PBI from the data source directly.

dramus
Continued Contributor
Continued Contributor

Given this data:

devices and apps.PNG

You want this result:

Capture.PNG

 

To get this I took the [# of Apps] (not summarized) and the count distinct [Device] from the 'Devices' table.

 

I think I am missing this step:

 

"You can then join these to the main data table."

 

Is this a union in DAX or a merge in the tables and if so which tables merging on what?

 

Sorry for all the questions but I greatly appreciate the help.

dramus
Continued Contributor
Continued Contributor

"You can then join these to the main data table."

 

Is this a union in DAX or a merge in the tables and if so which tables merging on what?

 

I mean create relationships between your original table and the two new summary tables.

 

relationship.PNG

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors