Forum Discussion

Xtreme-90's avatar
Xtreme-90
Regular Visitor
3 years ago
Solved

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?

 

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

  • 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,

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

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

     

    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 [email protected]

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

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

1 Reply

  • 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,

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

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

     

    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 [email protected]

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

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