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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
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
Solved! Go to Solution.
@Anonymous , try like
Sumx(summarize(Sales, Contract[Business], Contract[Site ID]) , calculate(abs( TOTALMTD(SUM(Sales[Amount]),Date[DATE]))))
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |