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
nice_boy
Regular Visitor

DAX problem calculating value

 Hello,

I want to create measure in the table "TAB_1", which sums up tle values "VALUES" from the table "TAB_2" only then if in the table "TAB_2" appears "cont_id" bigger than 0. I enclose screencast of my model. In my opinion, I have to activate inactive relationships. These relationships must be inactive in the model. I have now created something like this:

Values = CALCULATE(sum(TAB_2[VALUES]); 
USERELATIONSHIP(TAB_1[TAB1_id];TAB_2[TAB2_id]); TAB_2[cont_id]>0; 
USERELATIONSHIP(TAB_1[date];TAB_DATE[date]))

Unfortunately, this measure sums up everything from "VALUES" and it doesn't work on date filters.

1.png

 

 

 

 

6 REPLIES 6
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @nice_boy,

 

Based on my test, the above measure you provided works fine to generate the sum value. Below is the result in my test. I used a card visual to display the measure value.

1.PNG

 

In your scenario, what visualization did you use? Please show us the current output which does not meet your requirement.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
nice_boy
Regular Visitor

Unfortunately still not working date filter

Anonymous
Not applicable

Change the link between the date table and Tab_1 to be Both directions.

I changed it but did not change

Anonymous
Not applicable

There must be something else at play here thats bigger than what is presented.  It would be worth double checking your date slicers and making sure they come from one of those 3 tables.

Anonymous
Not applicable

To me it looks like you are overcompliating the measure itself.  You already have the table relationships so just try this simple measure:

Values = CALCULATE(
	sum(TAB_2[VALUES]),
	TAB_2[cont_id] > 0
)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.