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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Chanise89
Helper I
Helper I

Can I use USERELATIONSHIP between YEAR and QUARTER columns in one table...

Good Evening ,

I'm not sure if this is possible but lets see...

I have 2 tables :

1. GL Acct Data 

2. Calendar table

 

I need to filter 'Actual Amount' by Quarter and Year. (Literally by using a dropdown filter).

I have created calculation to use the inactive relationship between Quarter and Year from the 'GL Acct Data' table to the "Quarter" and "Year" columns in the 'Calendar' table: 

Chanise89_0-1678576509780.png

Chanise89_1-1678576521709.png

This works great as expected. 

However, when I create two seperate dropdown filters using the "Quarter" and "Year" from the Calendar table, I need it to filter the 'Actual Amount' field. 

They work seperately but I need one 'Actual Amount' column...

 

Chanise89_2-1678576824147.png

 

Please help!

 

 

1 ACCEPTED SOLUTION

No.  It will not.  You need an actual date column.  If the Quarter column has number 1,2,3,4, then write this calculated column formula to create a Date column

Date = date('GL Acct Data'[N_YEAR],3*'GL Acct Data'[QUARTER],1)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Chanise89
Helper I
Helper I

@Ashish_Mathur 

 

will this work?

 

Year & Quarter = 'GL Acct Data'[N_YEAR] & "," &'GL Acct Data'[QUARTER]

No.  It will not.  You need an actual date column.  If the Quarter column has number 1,2,3,4, then write this calculated column formula to create a Date column

Date = date('GL Acct Data'[N_YEAR],3*'GL Acct Data'[QUARTER],1)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

You should not have 2 seperate measures.  Assuming there is a Date field in the GL Acct Data table, the inactive relationship should be from the Date field in this table to the Date field in the Calendar Table.  In the USERELATIONSHIP() function, the inputs should be of the Date column (not year column).


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

HI @Ashish_Mathur ,

 

Unforturnely there isn't a Date field in the GL Acct data table - there is only Quarter and Year. 

I am working off a query that only pulls in Quarter and Year. ..

 

Do you think its impossible to do what I am asking?

Hi,

From the Quarter and Year fields, create a calculated column formula to get the Date.  Then follow mu suggestion mentioned in the previous post. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.