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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
th3h0bb5
Resolver II
Resolver II

Cross role-playing dim filtering

Here is my model (simplified to make this clearer):

 

Model.png

 

Both facts are forecasted values. So, something like "In 2017 (snapshot year) here's what we thought 2019's (program year) revenue would be. My business users get to pick one or more Program Years and I am trying to create a measure which will automatically filter the Snapshot Year to match the selected Program Years. Here's an example:

 

My business users wants to see Units Sold and Revenue for Program Year 2020 and 2021. These Program years were forecasted across several years, so his filter selection returns this:

Selection.png

 

I want to create a filter which automatically reduces this rows where ProgramYear = Snapshot Year. Like so:

ProperSelection.png

 

My final goal is to create a Table visual that returns this:

 

FinalResult.png

 

What visual-level filter can I create which will automatically pass the two selected ProgramYears across to the SnapshotYear table and filter the fact tables accordingly?

2 ACCEPTED SOLUTIONS
DataInsights
Super User
Super User

@th3h0bb5,

 

Add this measure as a visual-level filter (filter "is 1"):

 

Year Match = 
IF ( MAX ( 'Program Year'[Year] ) = MAX ( 'Snapshot Year'[Year] ), 1 )

 

The table visual uses Program Year[Year] and Snapshot Year[Year]:

 

DataInsights_0-1657492985711.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

My approach would be as follows:

1. Append the 2 FACT tables

2. Unpivot all columns except the Program Year and Snapshot Year

3. Create a Calculcated column (Date) in the single FACT table (created in step 1 above)

4. Have only 1 calendar table with a relationship (Many to One and Single) from the Date column of the Fact table to the Date column of the Calendar Table

5. In the Calendar Table, write a calculated column formula to extract Year

6. To your visual, drag Year from the Calendar Table

7. Then write measures to get your desired result.

Hope this helps.


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

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

My approach would be as follows:

1. Append the 2 FACT tables

2. Unpivot all columns except the Program Year and Snapshot Year

3. Create a Calculcated column (Date) in the single FACT table (created in step 1 above)

4. Have only 1 calendar table with a relationship (Many to One and Single) from the Date column of the Fact table to the Date column of the Calendar Table

5. In the Calendar Table, write a calculated column formula to extract Year

6. To your visual, drag Year from the Calendar Table

7. Then write measures to get your desired result.

Hope this helps.


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

@th3h0bb5,

 

Add this measure as a visual-level filter (filter "is 1"):

 

Year Match = 
IF ( MAX ( 'Program Year'[Year] ) = MAX ( 'Snapshot Year'[Year] ), 1 )

 

The table visual uses Program Year[Year] and Snapshot Year[Year]:

 

DataInsights_0-1657492985711.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors