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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ciken
Resolver I
Resolver I

Relationships break with CALCULATE measure

I have built a table to pull Account, Order Date, Customer name, and Product Purchased. It works PERFECTLY when I create a use the COUNT(customerid ) as my value. But when I create a measure to do the same thing, everything counts exactly the same but it lists ALL products, not just the ones on that specific order! Below are screen shots of the before and after using a measure as well as the measure itself. 

 

Any additional filter on the measure that would only find the products listed on the Order Products table?

 

Thanks in advance,

 

 

DAX: 

New In Practice Signup = CALCULATE(COUNT('Order'[FirstConsumerOrderCount]),FILTER('Order','Order'[New Subscription vs Renewal]="New ARP In Practice"))
With COUNT(Consumer_lead__c) as value
ciken_1-1644609977622.png

 

With Measure as the value
:
ciken_0-1644609931287.png

 

1 ACCEPTED SOLUTION

This was really helpful with a slight modification...I ended up using the COUNTA but put it on the Order_Products data table instead of the 'Order' Table and it was able to start counting each product on an order (which is really what I wanted to get to anyway. 

 

New AutoRefill Subscriptions = CALCULATE(COUNTA('Order Product'[Autoship_vs_Single_Order__c]),'Order'[New Subscription vs Renewal]="New ARP In Practice"||'Order'[New Subscription vs Renewal]="New Subscriber - not In Practice")


Thank you for your help!!

View solution in original post

2 REPLIES 2
bcdobbs
Community Champion
Community Champion

Are you able to share a demo pbix file or some example data from the underlying tables? Hard to diagnose without that but you might try:

 

New In Practice Signup =
	CALCULATE (
	    COUNTROWS ( 'Order' ),
	    'Order'[New Subscription vs Renewal] = "New ARP In Practice"
	)


Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

This was really helpful with a slight modification...I ended up using the COUNTA but put it on the Order_Products data table instead of the 'Order' Table and it was able to start counting each product on an order (which is really what I wanted to get to anyway. 

 

New AutoRefill Subscriptions = CALCULATE(COUNTA('Order Product'[Autoship_vs_Single_Order__c]),'Order'[New Subscription vs Renewal]="New ARP In Practice"||'Order'[New Subscription vs Renewal]="New Subscriber - not In Practice")


Thank you for your help!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.