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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Values for a measure does not show up

Hi Experts!

 

I have three tables in PowerBI desktop.

 

Contract: Business, Site_ID, Contract_ID

Date: DateID, Date

Sales: DateID, Contract_ID, Amount

 

Sales account is connected to other two tables based on DateID and Contract_ID. I need to get a Month-to_date summary on Business level and Site_ID level.

But the logic is, MTD values on Site_ID level, final daily MTD value should be positive. So all negative values should show as positive.

Then in Business level, all Site_ID level values should be added. That is all positive values should be added.

 

I added a measure and it works fine. 

 

 

 

 

MTD = 
CALCULATE(
    SUMX(FILTER(Contract, Contract[Business] = SELECTEDVALUE(Contract[Business])),
    IF(TOTALMTD(SUM(Sales[Amount]),Date[DATE])<0,TOTALMTD(SUM(Sales[Amount]),Date[DATE])*(-1),TOTALMTD(SUM(Sales[Amount]),Date[DATE]))),
    ALLSELECTED(Contract[Business])
)

 

 

 

 

 

But when I get this measure to a visual, the values are blank.

cho_0-1677491891694.png

 

When i get a summary by Site_ID level, for some Site_IDs values show. For some nothing shows. BLANK.

I checked the relationships also, and those looked fine to me.

 

Can someone please help

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , try like

 

Sumx(summarize(Sales, Contract[Business], Contract[Site ID]) , calculate(abs( TOTALMTD(SUM(Sales[Amount]),Date[DATE]))))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , try like

 

Sumx(summarize(Sales, Contract[Business], Contract[Site ID]) , calculate(abs( TOTALMTD(SUM(Sales[Amount]),Date[DATE]))))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.