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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Hoping
Helper III
Helper III

Create Measure without altering context

I have a table - TABA  which has a PERSON_ID, few other columns, INDICATOR column that has 2 values - YES and NO and an AMOUNT column.

 

I have a table visual with PERSON_ID, all othercolumns and adding AMOUNT_MEASURE finally.

 

AMOUNT_MEASURE = CALCULATESUM('TABA'[Amount]), 'TABA'[Indicator] = "YES" )
 
Now some PERSON_IDs don't have rows where INDICATOR = "YES"
 
I want to display AMOUNT_MEASURE and if there are no rows for a person where INDICATOR = "YES"  then I want to display ZERO
 
EDIT: I understood the problem. The AMOUNT_MEASURE filters the table to only rows that have "YES" and there are None in some cases, so the entire row in the table visualisation disappears.
 
How can I calculate AMOUNT_MEASURE if ther exist at least one row with with INDICATOR = "YES"  else show ZERO  without affecting other columns in the table i.e. without affecting grain of the table?
 
 
1 ACCEPTED SOLUTION

If the measure doesn't return a value, even with the  "+ 0" it means that Xiaoxin Sheng is right and you need additional (dimension) tables to force evaluation for every combination.
Note that I wouldn't necessarily add one table with each combination, but more likely dimension tables for PERSON, INDICATOR and CATEGORY.

View solution in original post

4 REPLIES 4
sjoerdvn
Super User
Super User

Try adding "+ 0" to your measure.

This didn't work.  The measure never returns.

If the measure doesn't return a value, even with the  "+ 0" it means that Xiaoxin Sheng is right and you need additional (dimension) tables to force evaluation for every combination.
Note that I wouldn't necessarily add one table with each combination, but more likely dimension tables for PERSON, INDICATOR and CATEGORY.

Anonymous
Not applicable

Hi @Hoping ,

If you mean these records not real include in your table, you may need to create a new table with all combinations of two categories. Then you can compare them with 'YES' records count to get blank/missed records amounts.

In addition, Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.