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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
shivar
Helper I
Helper I

calculate the count of rows with no blanks in column

Hello All,

 

I am trying to calculate the colum i.e CALCULATED COLUMN. I want to add the percentages from different columns and divide it by the number of values as shown below using the dax expression.

 

What i am trying to calculate is shown in the CALCULATED COLUMN.

 

Can anyone help me on this?

 

 

idWOCUT  TOUGHEN  WASH   POLISH   DISPATCH   CALCULATED COULMN
140%50%60%   =(40+50+60)/3

270%80%    =(70+80)/2
310%20%30%40%50% =(10+20+30+40+50)/5
420%30%50%70%0%0%=(20+30+50+70)/6
1 ACCEPTED SOLUTION
Aditya_Meshram
Solution Supplier
Solution Supplier

Hi @shivar ,You can use the following DAX for the calculated column

 

CALCULATED COLUMN = 

DIVIDE ( WO+CUT+TOUGHEN+WASH+POLISH+DISPATCH ,
IF(ISBLANK(WO),0,1)+ IF(ISBLANK(CUT),0,1)+ IF(ISBLANK(TOUGHEN),0,1)+
IF(ISBLANK(WASH),0,1) + IF(ISBLANK(POLISH),0,1) + IF(ISBLANK(DISPATCH),0,1)
,0)

View solution in original post

3 REPLIES 3
Aditya_Meshram
Solution Supplier
Solution Supplier

Hi @shivar ,You can use the following DAX for the calculated column

 

CALCULATED COLUMN = 

DIVIDE ( WO+CUT+TOUGHEN+WASH+POLISH+DISPATCH ,
IF(ISBLANK(WO),0,1)+ IF(ISBLANK(CUT),0,1)+ IF(ISBLANK(TOUGHEN),0,1)+
IF(ISBLANK(WASH),0,1) + IF(ISBLANK(POLISH),0,1) + IF(ISBLANK(DISPATCH),0,1)
,0)

Thanks @Aditya_Meshram 

shivar
Helper I
Helper I

@amitchandak Hello Amit,

 

Can you help me on this.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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