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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Two measures exclude nulls when in a matrix

I have two tables like the following:

Loyalty and Rating CRM:

DCSS IDDCSS Rep IdDCSS ID + Rep IdNameLoyaltyRating
1000110010001+100BobA$100,000+
1000210010002+100SueA$10,000+
1000310110003+101DanielF$100+
1000410510004+105TerryB$1000+
1000510810005+108SteveF$0+
1000610810005+108PaulF$0+


Loyalty and Rating Data Warehouse

DCSS IdDCSS Rep IdDCSS ID + Rep IdDonation_Fiscal_YearDonation_Amount
1000110010001+1002020$100,000
1000110010001+1002021$50,000
1000210010002+1002020$10,000
1000310110003+1012020$100
1000310110003+1012021$10,000
1000410510004+1052020$1,000
1000510810005+1082021$100

 

They are joined on [DCSS ID + Rep Id]. I have measures like the following:

FY20 Actuals =
CALCULATE(SUM('Loyalty and Rating Data Warehouse'[Donation Amount])
,ALL('Loyalty and Rating CRM'[DCSS ID])
,'Loyalty and Rating Data Warehouse'[Donation_Fiscal_Year] = 2020)
FY21 Actuals =
CALCULATE(SUM('Loyalty and Rating Data Warehouse'[Donation Amount])
,ALL('Loyalty and Rating CRM'[DCSS ID])
,'Loyalty and Rating Data Warehouse'[Donation_Fiscal_Year] = 2021)


If I have one of the measures, the blank entries are included for that measure. For example, Sue only gave in 2020, if I use the FY21 Actuals, the row for her would have a blank value. When I have both the measures, I lose that row, for example, Paul has no donations but I still want to show his name.

What I want to see is:

 FY21 ActualsFY20 Actuals
Bob$50,000$100,000
Sue$0$10,000
Daniel$10,000$100
Terry$0$1,000
Steve$100$0
Paul$0

$0

 

What I'm seeing is Paul is missing and blank values where I'd like a $0:

 

 FY21 ActualsFY20 Actuals
Bob$50,000$100,000
Sue $10,000
Daniel$10,000$100
Terry $1,000
Steve$100 

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

Your measure is correct, it will show blank if there is no value in your ’Loyalty and Rating Data Warehouse‘.

Click Name column in Value Field in table visual and select show items with no data.

Now you can see the blank value.

1.png

If you want to show 0 when the value is blank, you can update your measure as [Measure]+0.

FY20 Actuals = 
CALCULATE(SUM('Loyalty and Rating Data Warehouse'[Donation_Amount])
,ALL('Loyalty and Rating CRM'[DCSS ID])
,'Loyalty and Rating Data Warehouse'[Donation_Fiscal_Year] = 2020)+0
FY21 Actuals = 
CALCULATE(SUM('Loyalty and Rating Data Warehouse'[Donation_Amount])
,ALL('Loyalty and Rating CRM'[DCSS ID])
,'Loyalty and Rating Data Warehouse'[Donation_Fiscal_Year] = 2021)+0

 Result is as below.

3.png

Best Regards,

Rico Zhou

 

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

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous 

Your measure is correct, it will show blank if there is no value in your ’Loyalty and Rating Data Warehouse‘.

Click Name column in Value Field in table visual and select show items with no data.

Now you can see the blank value.

1.png

If you want to show 0 when the value is blank, you can update your measure as [Measure]+0.

FY20 Actuals = 
CALCULATE(SUM('Loyalty and Rating Data Warehouse'[Donation_Amount])
,ALL('Loyalty and Rating CRM'[DCSS ID])
,'Loyalty and Rating Data Warehouse'[Donation_Fiscal_Year] = 2020)+0
FY21 Actuals = 
CALCULATE(SUM('Loyalty and Rating Data Warehouse'[Donation_Amount])
,ALL('Loyalty and Rating CRM'[DCSS ID])
,'Loyalty and Rating Data Warehouse'[Donation_Fiscal_Year] = 2021)+0

 Result is as below.

3.png

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Anonymous
Not applicable

Hi @Anonymous 

 

Use COALESCE outside your measure:

FY20 Actuals =
COALESCE(CALCULATE(SUM('Loyalty and Rating Data Warehouse'[Donation Amount])
,ALL('Loyalty and Rating CRM'[DCSS ID])
,'Loyalty and Rating Data Warehouse'[Donation_Fiscal_Year] = 2020),0)

FY21 Actuals =
COALESCE(CALCULATE(SUM('Loyalty and Rating Data Warehouse'[Donation Amount])
,ALL('Loyalty and Rating CRM'[DCSS ID])
,'Loyalty and Rating Data Warehouse'[Donation_Fiscal_Year] = 2021),0)

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.