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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Niiru1
Helper V
Helper V

Subtract Measure Values from Column

Is there a way to subtract column values [Rules] from a measure?

 

My measure which gives me number of working days in a month is:

 

Measure 5 = 
VAR _Month = CALCULATE(COUNT(DimDate[Days in Month]),FILTER(DimDate,'DimDate'[WorkingDays] <>BLANK()))
VAR _lastday=
COUNTROWS(
FILTER(DimDate,'DimDate'[WorkingDays] <>BLANK()))
RETURN
IF ( ISBLANK ( [AbsentByDay] ), BLANK (), _lastday )

 

Thanks,

 

https://www.dropbox.com/s/vojq25pkazt4lmj/Sample5.pbix?dl=0

3 REPLIES 3
Niiru1
Helper V
Helper V

@amitchandak I think I have it here:

Measure 9 = 

IF(HASONEVALUE('Employee Absence Full Table'[Rules]),[Measure 5],
SUMX(
ALLSELECTED('Employee Absence Full Table'),
[Measure 5]))- SUMX(ALLSELECTED('Employee Absence Full Table'[Rules]),'Employee Absence Full Table'[Rules])
But I end up with this, is there a way to just remove the values if measure 5 is blank?
Subtract output filter need1.PNG
 
 
 

 

amitchandak
Super User
Super User

@Niiru1 , The output will be measure not column.

Can you share output in table format?

Subtract output.PNG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors