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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors