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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

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])
    )

 

1 ACCEPTED SOLUTION

@Anonymous

 

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

 

Get Varience on Matrix_1.jpg

 

Best Regards,

Herbert

View solution in original post

7 REPLIES 7
v-haibl-msft
Microsoft Employee
Microsoft Employee

@Anonymous

 

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

 

Best Regards,

Herbert

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

@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

Anonymous
Not applicable

Hi Herbert,

 

It seems you cannot not have inactive relationships in PowerBi, someone will hopefully come up with a grpahic in R or something.

 

Thanks

 

Chris

@Anonymous

 

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

 

Get Varience on Matrix_1.jpg

 

Best Regards,

Herbert

Anonymous
Not applicable

Thanks will have a look into that!

Anonymous
Not applicable

I am trying to get it to look like

 

http://blog.gbrueckl.at/2014/02/applied-basket-analysis-in-power-pivot-using-dax/

 

I have it working in excel now trying to convert it to PowerBI.

 

Thanks

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.