Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago
Solved

Get Varience on Matrix

Hi,

 

The below code does not seem to work, I can bring in the matrix details fine, but when I am trying to say give me last years value (Same PeriodLastyear) based on the filter it does not work.

 

Any ideas...

 

Thanks

 

C

 

=CALCULATE (    DISTINCTCOUNT ( AdDetails[company] ),    CALCULATETABLE (        SUMMARIZE ( AdDetails, Table2[Company Grouping]),        ALL ( titles ),        USERELATIONSHIP ( AdDetails[ttlname],'FilterTitle'[filterttlname] ),SAMEPERIODLASTYEAR('Calendar'[Date])
    )

 

  • Anonymous

     

    We can mark relationships as inactive to reduce ambiguity in Power BI as below.

     

     

    Best Regards,

    Herbert

7 Replies

  • v-haibl-msft's avatar
    v-haibl-msft
    Microsoft Employee

    Anonymous

     

    Could you please give some sample data, relationships of your tables and the expected output?

     

    Best Regards,

    Herbert

    • Anonymous's avatar
      Anonymous
      Not applicable

      Its ok Herbet,

       

      I spoke to someone from PowerBi who says you cant have indirect relationship between tables, so not sure how it can be done in PowerBI

      • v-haibl-msft's avatar
        v-haibl-msft
        Microsoft Employee

        Anonymous

         

        For relationships in Power BI, please refer to this document.

        To see if we can get your expect result, we need the sample data of your tables.

         

        Best Regards,

        Herbert