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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Volker
Regular Visitor

Measure to identify sum = zero for a member not successful

Dear forum members,,

 

I have a rather easy appearing topic, but just can't get to the right DAX formula.

 

I'd like to show whether a part number (Sys_Plant_CAM) has a value equal zero in a certain column [lo_indreq] or not. The only obstacle is that the part number has various rows for single dates - some zero and some not zero.

 

I thought it would not be difficult using a Measure like the following to fill the total sum for all those part numbers:

CALCULATE(
    SUM('v_md04_latest'[lo_indreq]),
    ALLSELECTED('v_md04_latest'[Sys_Plant_CAM])
)
 
And then add a clolumn verifying whether the value in this measure is zero or not:
PIR_Y_N_2 = if(v_md04_latest[lo_indreq total for Sys_Plant_CAM]>0, "Y", "N")
 
But the measure does not show the total sum but always the distinct value, hence also the new column is not showing a unique value bot always depending on the date column:
Volker_1-1638290609054.png

 

Thanks for any help how to solve the issue.

 

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

I think you want this instead:

CALCULATE (
    SUM ( 'v_md04_latest'[lo_indreq] ),
    ALLEXCEPT ( 'v_md04_latest', 'v_md04_latest'[Sys_Plant_CAM] )
)

You want to remove all filters except the Sys_Plant_CAM.

View solution in original post

3 REPLIES 3
AlexisOlson
Super User
Super User

I think you want this instead:

CALCULATE (
    SUM ( 'v_md04_latest'[lo_indreq] ),
    ALLEXCEPT ( 'v_md04_latest', 'v_md04_latest'[Sys_Plant_CAM] )
)

You want to remove all filters except the Sys_Plant_CAM.

Thanks Alexis,

it worked perfectly as expected.

Anonymous
Not applicable

Try:

 

CALCULATE(
    SUM('v_md04_latest'[lo_indreq]),
    ALL('v_md04_latest'[calmonth]))
 
--Nate

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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