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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
vtayle900
Regular Visitor

Cumulative Sums on different dates

Hi Guys,

 

I have a Date Dim table and another table which contains

Date Signed, Date Sold, and a status column with both Accepted and Sold . Both are connected to the Date Dim which has a Year column. The Date Signed is the active relationship

 

I am trying to cumulate by Year based on the two dates. ie one line Signed by year another Sold by Year. 

 

So far i have tried the below for Date Signed and the values are correct.

 

SalesContracct ## = CALCULATE (
DISTINCTCOUNT(New_salescontractSet[New_salescontractId]),USERELATIONSHIP(New_salescontractSet[SignedOn], 'DateDim'[Date]),
FILTER (ALL(DateDim[Date]),
('DateDim'[Date]) <= MAX ( DateDim[Date] ) && DateDim[Date] <= TODAY()))

 

How do i get the cumulative count if the Sold date is not the active relationship and also inlcude the Status of "Sold"

 

can anyone please assist?

 

cheers

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @vtayle900,

You can use the USERELATIONSHIP function to apply an inactive relationship to a particular DAX expression. In your scenario, you are able to use USERELATIONSHIP(New_salescontractSet[SoldOn], 'DateDim'[Date]) formula as a filter, and add another filter which includes “Sold” status in Calculate function.

Please check if the following formula meets your requirement. If not, please share sample data of your tables and post expected result here. Also please help to post detailed error message if you get any errors.

SalesContracctSold ## = CALCULATE (
DISTINCTCOUNT(New_salescontractSet[New_salescontractId]),USERELATIONSHIP(New_salescontractSet[SoldOn], 'DateDim'[Date]),
FILTER (ALL(DateDim[Date]),
('DateDim'[Date]) <= MAX ( DateDim[Date] ) && DateDim[Date] <= TODAY()),New_salescontractSet[Status]="Sold")



Thanks,
Lydia Zhang

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @vtayle900,

You can use the USERELATIONSHIP function to apply an inactive relationship to a particular DAX expression. In your scenario, you are able to use USERELATIONSHIP(New_salescontractSet[SoldOn], 'DateDim'[Date]) formula as a filter, and add another filter which includes “Sold” status in Calculate function.

Please check if the following formula meets your requirement. If not, please share sample data of your tables and post expected result here. Also please help to post detailed error message if you get any errors.

SalesContracctSold ## = CALCULATE (
DISTINCTCOUNT(New_salescontractSet[New_salescontractId]),USERELATIONSHIP(New_salescontractSet[SoldOn], 'DateDim'[Date]),
FILTER (ALL(DateDim[Date]),
('DateDim'[Date]) <= MAX ( DateDim[Date] ) && DateDim[Date] <= TODAY()),New_salescontractSet[Status]="Sold")



Thanks,
Lydia Zhang

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors