Forum Discussion

reddy421_hc's avatar
reddy421_hc
Frequent Visitor
6 years ago
Solved

power bi create a calculated column from different relationship

Hello, I have a few date fields in my fact table. I created a date dimension table and assigned all the relationships to them. I Know only one will be active out of all. ( pic is shown below). ...
  • reddy421_hc's avatar
    reddy421_hc
    6 years ago

    Below is how I got what I needed.

    Thank you all for your help.

    I really Love this community.

    Cumulative Total Hospitalized =
    CALCULATE(
    SUM ( CaseDataAnalysisReport[IsHospitalized]),
        FILTER(
            ALLSELECTED('Date'[Date]),
            ISONORAFTER('Date'[Date], MAX('Date'[Date]), DESC)
        ),
    USERELATIONSHIP (CaseDataAnalysisReport[DateHospitalized],'Date'[Date]
    )
    )