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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Xtreme-90
Regular Visitor

Two questions : creating a matrix and not counting null values

Hi All,

 

I recently started using Powerbi for visualizations, and I am stuck on two questions and need help.

 

Question 1:

How can I create a visualization like this? Say, for example, I a similar data and want the final output to be arranged like this; how can I achieve this in PowerBi?

Sample-.jpg

 

Question 2:

I have a list of data that I want the show the total number, and I can use the card visualization and count distinct; the issue is that blank rows get counted too. Here is an example:

Street    Cars

Li          White

Jane

Vic       Blue

Tar       Red

Mark   Green

 

In this case, the issue is that I count cars as distinct though Jane is blank, it gets counted. Visualizations on the dashboard are linked so I want it to be blank and not show a number when filtered for jane.

 

Thanks for the help

1 ACCEPTED SOLUTION
SamInogic
Super User
Super User

Hi @Xtreme-90 ,

For question 1, we are bit unclear with your data structure but as per the listed table you can use matrix as shown in below screenshot,

SamInogic_0-1682076980959.png

For Question 2, you can create a measure in your table with DAX expression:

Total Cars = CALCULATE(COUNTROWS(StreetCars), not (StreetCars[Cars] = ""))

 

SamInogic_1-1682076996673.png

If this answer helps, please mark it as an Accepted Solution so it would help others to find the solution.


Thanks!

Inogic Professional Service Division

An expert technical extension for your techno-functional business needs

Power Platform/Dynamics 365 CRM

Drop an email at crm@inogic.com

Service:  http://www.inogic.com/services/ 

Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Drop an email at crm@inogic.com
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/

View solution in original post

1 REPLY 1
SamInogic
Super User
Super User

Hi @Xtreme-90 ,

For question 1, we are bit unclear with your data structure but as per the listed table you can use matrix as shown in below screenshot,

SamInogic_0-1682076980959.png

For Question 2, you can create a measure in your table with DAX expression:

Total Cars = CALCULATE(COUNTROWS(StreetCars), not (StreetCars[Cars] = ""))

 

SamInogic_1-1682076996673.png

If this answer helps, please mark it as an Accepted Solution so it would help others to find the solution.


Thanks!

Inogic Professional Service Division

An expert technical extension for your techno-functional business needs

Power Platform/Dynamics 365 CRM

Drop an email at crm@inogic.com

Service:  http://www.inogic.com/services/ 

Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Drop an email at crm@inogic.com
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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