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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Umadhandapani
Helper II
Helper II

Row and Column Matching

Umadhandapani_0-1655122594522.png

 

 

In the image, Org1 & Org1 has value, simillary Org2 and Org 4. Org3 and Org5 we don't have value, I want to remove this against column wise and also other column instead of blank need to replace with zero. 

I have tried to replace with zero using measures, but it showing as,

Umadhandapani_1-1655122594576.png

 

 

But, need in this form,

Umadhandapani_2-1655122594551.png

 

 

1 ACCEPTED SOLUTION

@Greg_Deckler 

Herewith explained the flow,

Table 1 : 

Umadhandapani_4-1655181895538.png

 

Table 2 :

Umadhandapani_5-1655181916191.png

 

I have used the matrix table,

Umadhandapani_6-1655181958904.png

 

But need to replace blank with zero. So, I used the following measure,

 

Measure = IF(SUM('Table'[Column2]) = BLANK(),0,SUM('Table'[Column2]))

Umadhandapani_7-1655182022924.png

 

But, those entire column and row need to be removed where value is zero.
So, I followed the following measure,

Measure 2 = IF([Measure] = 0,0,1)
 
where I have used in filter pane.
 
Umadhandapani_8-1655182098482.png

 

For  row wise it is perfect, but for column it is not working.

 

Expected Output to be,


Umadhandapani_9-1655182165639.png

 

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@Umadhandapani What does your actual data look like?

Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 

Herewith explained the flow,

Table 1 : 

Umadhandapani_4-1655181895538.png

 

Table 2 :

Umadhandapani_5-1655181916191.png

 

I have used the matrix table,

Umadhandapani_6-1655181958904.png

 

But need to replace blank with zero. So, I used the following measure,

 

Measure = IF(SUM('Table'[Column2]) = BLANK(),0,SUM('Table'[Column2]))

Umadhandapani_7-1655182022924.png

 

But, those entire column and row need to be removed where value is zero.
So, I followed the following measure,

Measure 2 = IF([Measure] = 0,0,1)
 
where I have used in filter pane.
 
Umadhandapani_8-1655182098482.png

 

For  row wise it is perfect, but for column it is not working.

 

Expected Output to be,


Umadhandapani_9-1655182165639.png

 

Hi, @Umadhandapani 

 

You can try the following methods.

New Table:

Table = 
Var N1=SUMMARIZE('Table 1','Table 1'[Column1],'Table 1'[Column2])
return
FILTER(N1,[Column2]>0)

vzhangti_0-1655372767349.png

Measure 1 = IF(SUM('Table'[Column2])=BLANK(),0,SUM('Table'[Column2]))
Measure 2 = IF(SUM('Table'[Column2])<>0,1,0)

vzhangti_1-1655373099740.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.