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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
benmccarthy
Frequent Visitor

DAX Measure not Totalling

Hi,

 

I'm fairly new to PowerBi, I have created the following measure but when I try and sum up the values the Total is just 1 even though there are many occurences of 1 in the column.  If I just return Result it works correctly however when I put the IF statement around the measure I can't sum up the column and I need the IF statement!

 

Can someone please point me in the right direction?

 

Inefficient Range Count (FORM) =
VAR Result =
    CALCULATE(COUNT('WOLaborTime (PivotByFuntion)'[Efficiency Range (FORM)]),'WOLaborTime (PivotByFuntion)'[Efficiency Range (FORM)]="InEfficient")
RETURN
    If(Result>0,1,BLANK())
1 ACCEPTED SOLUTION
dharmendars007
Super User
Super User

Hello @benmccarthy , 

 

You have use SUMX to get the row context inside your measure..please try the below measure.

 

Inefficient Range Count (FORM) =
SUMX(
'WOLaborTime (PivotByFuntion)',
IF(
'WOLaborTime (PivotByFuntion)'[Efficiency Range (FORM)] = "InEfficient",
1,0))

 

If you find this helpful , please mark it as solution and Your Kudos are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

 

View solution in original post

2 REPLIES 2
sjoerdvn
Super User
Super User

To anwer this, we would need more information on the columns you want the summarize to happen. 

dharmendars007
Super User
Super User

Hello @benmccarthy , 

 

You have use SUMX to get the row context inside your measure..please try the below measure.

 

Inefficient Range Count (FORM) =
SUMX(
'WOLaborTime (PivotByFuntion)',
IF(
'WOLaborTime (PivotByFuntion)'[Efficiency Range (FORM)] = "InEfficient",
1,0))

 

If you find this helpful , please mark it as solution and Your Kudos are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

 

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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