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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors