cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Serj
Frequent Visitor

Calculate count of values from another table

Greeting to everyone!

 

Would you pls suggest how to move on with this? 

I have two tables. The first of them contains all possible variations of statuses. The second contains categories and their statuses. Not all possible status variations are present in the second table.

Serj_0-1667237728804.png

 

What I would to get as the desired output is a pivot table with all distinct categories in rows and count of matching statuses in columns, similar to EXEL calculation using COUNTIFS($D$4:$D$13,$B19,$E$4:$E$13,C$18), putting 0 for those statuses that are missing for related categories in the second table (for Status5 and Status6):

Serj_1-1667237728810.png

 

Thank you very much for your help and have a great day!

 

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

1) create a join between the Status columns

2) put Category in rows, All possible statuses in columns, and a measure

#rows = COUNTROWS(Table)+0

+0 at the end will wrok around the autoxists which would normally hide the values.

Another option is to show items with no data (right click on the fields definition) but I think it will show blanks by default (if the measure is just COUNTROWS, or you drag & drop column and count from UI)

 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Super User!

View solution in original post

2 REPLIES 2
Serj
Frequent Visitor

Hi @Stachu , thank you for a very prompt response. I tried it out and it works fine under option #1 of your solution. 

Stachu
Community Champion
Community Champion

1) create a join between the Status columns

2) put Category in rows, All possible statuses in columns, and a measure

#rows = COUNTROWS(Table)+0

+0 at the end will wrok around the autoxists which would normally hide the values.

Another option is to show items with no data (right click on the fields definition) but I think it will show blanks by default (if the measure is just COUNTROWS, or you drag & drop column and count from UI)

 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Super User!

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors