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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
PBI_V2
Helper IV
Helper IV

Power BI - SUM calculation with N/A or NA records

Hello All,

 

We have value column in the source which contains values for multiple attributes as values as "NA" meaning not applicable.

Below is the sample report:

PBI_V2_1-1701787905242.png

 

 

We need to create a measure which will show the summation of values in such a way that 

1) If we calculate region wise then SUM all values & show the summation

2) If we calculate Year wise then SUM all values & show the summation

3) if we calculate Region & year wise and there is no NA then show summation

4) if we calculate Region & year wise and there is all NA values then show NA

 

Kindly suggest how to create such measure.

 

Thanks,

PBI V2

1 ACCEPTED SOLUTION
ray_aramburo
Super User
Super User

You will not be able to SUM values with an explicit NA value since you can't combine numeric and text data. You need to replace NA with 0 or some default value you define. Then the measure is as easy as SUM(Table[ColumnName]).





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
ray_aramburo
Super User
Super User

You will not be able to SUM values with an explicit NA value since you can't combine numeric and text data. You need to replace NA with 0 or some default value you define. Then the measure is as easy as SUM(Table[ColumnName]).





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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