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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

USERELATIONSHIP combined with a Filter

Dear PowerBI Community,

I have a problem releted to the combination of a USERELATIONSHIP formule and a Filter. 

My initial problem was that I had two differents columns dates (IFD Actual and IFD Planned) that after counting them I needed  to show in the same graph. I solved this issue thanks to the help of another user, but now i have another problem:

I would like to do have a Cumulative function and in this case:

IFD Planned has an active connection and works perfectly 

IFD Actual has an inactive relationship and if I use the same cumulative formule, it doesn't work.

F_Cannata_0-1649344513934.png

without Filtering with cumulative function:

F_Cannata_1-1649344578690.png

Filtering and trying to do the cumulative:

F_Cannata_2-1649344656343.png

Do you have any idea on how may I show the cumulative also for IFD Actual?
Thanks in advance for your help

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

You need to do the cumulative filtering on the date table, not the model table.

 

See if this gets you closer:

IFD_PLANNED =
VAR _MaxDate = MAX ( 'Date 1'[Date] )
RETURN
    CALCULATE (
        COUNT ( 'Model 60'[IFD Planned] ),
        USERELATIONSHIP ( 'Model 60'[IFD Planned], 'Date 1'[Date] ),
        'Date 1'[Date] <= _MaxDate
    )

View solution in original post

2 REPLIES 2
AlexisOlson
Super User
Super User

You need to do the cumulative filtering on the date table, not the model table.

 

See if this gets you closer:

IFD_PLANNED =
VAR _MaxDate = MAX ( 'Date 1'[Date] )
RETURN
    CALCULATE (
        COUNT ( 'Model 60'[IFD Planned] ),
        USERELATIONSHIP ( 'Model 60'[IFD Planned], 'Date 1'[Date] ),
        'Date 1'[Date] <= _MaxDate
    )
Anonymous
Not applicable

Thanks a lot @AlexisOlson . This is the correct solution. I have only to do the calculation till today as date but it works perfectly. Thanks again!!!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.