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
vitexo87
Post Prodigy
Post Prodigy

Exclude nulls and whites from the calculation

Hi, I need help to fix a measure I created, I need my measure to consider only the middle column values ​​that are not null or blank:

Sem título.png

 

And my measure is this way today:

 

(IndicatorValue [Value]), Indicator [Name] = "IndicatorValue [Value]", IndicatorValue [Value], IndicatorValue [Value] Unidades_Rejeitos ")))

 

 

The value being presented is 1,053.00 being it should be only 551, how can I solve this?

1 ACCEPTED SOLUTION

Hi @vitexo87,

 

Please add a MAX() function for the Equipment [name],

 

Total of Units Rejected test = CALCULATE (sum (IndicatorValue [Value]); FILTER (Indicator; Indicator [Name] = "UnitsRejected" && not (isblank (MAX(Equipment [name])))))

 

Best Regards,
Qiuyun Yu

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
vanessafvg
Super User
Super User

@vitexo87 you could try this

 

measure = calculate(IndicatorValue [Value], Filter(IndicatorValue,

                                                                        IndicatorValue [Description1] = "Unidades_Rejeitos "

                                                                        && not(isblank(description2))))

 

you will have to rework this slightly





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg

 

I adapted your suggestion and tried it in two ways:

 

Follow:
Total of Units Rejected test = CALCULATE (sum (IndicatorValue [Value]); FILTER (Indicator; Indicator [Name] = "UnitsRejected" && not (isblank (Equipment)))

 

Error: "The expression references multiple columns. Multiple columns can not be converted to a scalar value."

 

and

 

Total of Units Rejected test = CALCULATE (sum (IndicatorValue [Value]); FILTER (Indicator; Indicator [Name] = "UnitsRejected" && not (isblank (Equipment [name]))))

 

Error: Unable to determine a unique value for the 'name' column in the 'Equipment' table. This can happen when a measurement formula refers to a column that contains many values, without specifying an aggregation such as min, max, cont, or sound to get a single result.

@vitexo87 Do you have a relationship between these tables equipment and indicator?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Hi @vitexo87,

 

Please add a MAX() function for the Equipment [name],

 

Total of Units Rejected test = CALCULATE (sum (IndicatorValue [Value]); FILTER (Indicator; Indicator [Name] = "UnitsRejected" && not (isblank (MAX(Equipment [name])))))

 

Best Regards,
Qiuyun Yu

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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