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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
pbi-bene
New Member

Count per category

Hi, 

 

I want to show the number of accounts that use our different applications: 

pbibene_0-1709128874491.png

 

This is how our data model is set up: 

pbibene_1-1709128913776.png

 

Which measure should I use to have the number of these accounts and not the sum of volumes in the facttable?

 

thanks for your help! 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @pbi-bene ,

Please try the following methods and check if they can solve your problem:

1.Create the simple table.

vjiewumsft_0-1709192863674.png

2.Create the new measure to sum Volumes.

 

Measure = SUM('FactTable'[Volumes])

 

 

3.Create the new measure to count account per application.

 

count account per application = 
if(
    ISINSCOPE('FactTable'[Account]),
    SUM('FactTable'[Volumes]), 
    CALCULATE(
        DISTINCTCOUNT(FactTable[Account]),
        filter(ALLSELECTED('FactTable'),'FactTable'[Application] = SELECTEDVALUE('FactTable'[Application]) && [Measure] > 0)
    )
)

 

4.Drag the count account measure into the matrix visual Values. Edit the Row subtotals.

vjiewumsft_1-1709192999339.png

vjiewumsft_2-1709193007254.png

5.The result is shown below.

vjiewumsft_3-1709193025520.png

Best Regards,

Wisdom Wu

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @pbi-bene ,

Please try the following methods and check if they can solve your problem:

1.Create the simple table.

vjiewumsft_0-1709192863674.png

2.Create the new measure to sum Volumes.

 

Measure = SUM('FactTable'[Volumes])

 

 

3.Create the new measure to count account per application.

 

count account per application = 
if(
    ISINSCOPE('FactTable'[Account]),
    SUM('FactTable'[Volumes]), 
    CALCULATE(
        DISTINCTCOUNT(FactTable[Account]),
        filter(ALLSELECTED('FactTable'),'FactTable'[Application] = SELECTEDVALUE('FactTable'[Application]) && [Measure] > 0)
    )
)

 

4.Drag the count account measure into the matrix visual Values. Edit the Row subtotals.

vjiewumsft_1-1709192999339.png

vjiewumsft_2-1709193007254.png

5.The result is shown below.

vjiewumsft_3-1709193025520.png

Best Regards,

Wisdom Wu

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

qqqqqwwwweeerrr
Super User
Super User

Hi @pbi-bene 

 

Can you share sample data for both the table reason being how the data structure in place is important?

 

Regards

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.