Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  Calculation with userelationship

    Posted Jul 05, 2022 07:08 PM
    I am relatively new to Power BI.  I am trying to create a percentage that compares Closed Denials to New Denials.  I had to utilize the USERELATIONSHIP to obtain the denominator (Create_Denials_new)

    create_denials_new =
    CALCULATE(COUNT('CONCURRENT_DATASOURCE_NEW'[ENCOUNTER NBR]),
    USERELATIONSHIP('CONCURRENT_DATASOURCE_NEW'[CREATE YEAR MO],'DATE TABLE'[Date]))

    Closed Denials  =
    CALCULATE(
    COUNT(
    'Concurrent_Datasource_New'[Encounter Nbr]
    ),
    FILTER(
    'Concurrent_Datasource_New',
    'Concurrent_Datasource_New'[Denial Type] = "Clinical Denial"
    && 'Concurrent_Datasource_New'[Is Closed Dt] = "N"
    )
    )

    I tried the following, and received a syntax error.

    Create Denials to New Denials % =
    DIVIDE('CONCURRENT_DATASOURCE_NEW'[Closed Denials]),
    (CALCULATE(COUNT('CONCURRENT_DATASOURCE_NEW'[ENCOUNTER NBR]),
    USERELATIONSHIP('CONCURRENT_DATASOURCE_NEW'[CREATE YEAR MO],'DATE TABLE'[Date])))

    Do I need to recreate the closed denials portion (numerator) with the filtered expression that I used earlier?

    Thanks for any assistance.


    ------------------------------
    Paula Greger
    Sr. Revenue Cycle Analytics Consultant
    Maricopa
    ------------------------------


  • 2.  RE: Calculation with userelationship

    Posted Jul 11, 2022 02:46 PM

    Hi Paula,

    Hard to say with no table structure and relations.

    USERELATIONSHIP is used when you have two or more relations between 2 tables and you want use in calculation non-active relation. From your code I think you use one table CONCURRENT_DATASOURCE_NEW, so I don't understand why USERELATIONSHIP? But as I said - hard to say without tables. And relations.

    BTW try use COUNTROWS if you count records/rows.

    Regards.



    ------------------------------
    Adam Artur Boltryk
    Business Analyst
    ------------------------------