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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
DanRus
Frequent Visitor

Calculate amount of groups per status.

My datasource looks llike that:

DanRus_0-1698332657404.png

I would like to create a visual(matrix)in PowerBi,that will count amount of companies per each status(the desirable output):

Equal: 2

Higher: 4

Lower: 4

DanRus_1-1698332765323.png

Unfortunelty the output I have is:

DanRus_2-1698332959249.png

Equal: 3

Higher: 10

Lower: 6

Could you please advise if there is a way to do it in PowerBi?

 

 

1 ACCEPTED SOLUTION
DanRus
Frequent Visitor

OK- I got the sollution.

So, I needed to create a seperate table in PowerBi.

This table(Tbl_Statuses) contains 3 rows- one row for each status(red, amber, neutral).

DanRus_0-1698658021196.png

Also I  needed to create a measure(CountofStatuses) to count how many red, amber, neutral statuses each company have.

 

CountofStatuses = COUNTROWS(
    FILTER(
        VALUES(Tbl_01[CompanyId]),
        [cat_sumPOsCCRs]=SELECTEDVALUE(Tbl_Statuses[Statuses])
    ))+0
 
I Have created a visual.
DanRus_1-1698658134166.png

Thank you for your help.

View solution in original post

5 REPLIES 5
DanRus
Frequent Visitor

Hi @FreemanZ ,

The test will be to compare two subtotals of valuesper each company  from columns F and G , like:

=IF(F2=G2,"Equal",IF(F2>G2,"Higher",IF(F2<G2,"Lower","N/A")))

 

DanRus_1-1698407932366.png

so the outoput Iam after, will be:

DanRus_2-1698408108825.png

 

Do you think it is possible?

 

DanRus
Frequent Visitor

OK- I got the sollution.

So, I needed to create a seperate table in PowerBi.

This table(Tbl_Statuses) contains 3 rows- one row for each status(red, amber, neutral).

DanRus_0-1698658021196.png

Also I  needed to create a measure(CountofStatuses) to count how many red, amber, neutral statuses each company have.

 

CountofStatuses = COUNTROWS(
    FILTER(
        VALUES(Tbl_01[CompanyId]),
        [cat_sumPOsCCRs]=SELECTEDVALUE(Tbl_Statuses[Statuses])
    ))+0
 
I Have created a visual.
DanRus_1-1698658134166.png

Thank you for your help.

FreemanZ
Super User
Super User

hi @DanRus ,

try to plot a table visual with the company_id column and a measure like:

measure = DISTINCTCOUNT(data[Status])

Thank you so much @FreemanZ, That works, I just realise, that the original datasource does not provide proper entry, however totals supposed to work OK.

I guess my next quetion is:

How I can apply status for totals per companies

DanRus_1-1698339933463.png

instead of each row:

DanRus_2-1698340096299.png

Please advise, and I am closing the topic. 

hi @DanRus ,

 

How does "apply status for totals per companies" look like? Could you describe it with an excel table?

Helpful resources

Announcements
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.