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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jytech
Helper I
Helper I

Filter and Visualize Historical Data Using Slicers

I have 3 tables:

  1. A Countries and Groups table that contains a list of countries and the respective Groups they belong to. This table has countries that can have duplicate or triplicate entries due to a change in Group at a specific point in time. For example, Spain is listed twice because from 01/2000 to 11/2019 they belonged to Group A, and from 12/2019 to NOW they belong to Group B.
  2. A Metrics/Data table containing measures and dimensions that I am reporting and creating visualizations for.
  3. A standard Date table.
  • 1 is related to 2 by Country Code
  • 2 is related to 3 by Date

I currently have slicers in place for Country, Group and Date. What I want to do is to have my date slicer filter out Group B when I select dates from 01/2000 to 11/2019 and then filter out Group A when I select dates from 12/2019 and beyond all while showing Spain and their sales, revenue and other metrics. 

 

As an added bonus, it would be great to be able to report Group metrics based on the above. For example, if the sum sales of Group A includes Spain from 01/2000 to 11/2019, it shouldn't include Spain from 12/2019 and beyond.

 

Any help would be greatly appreciated.

5 REPLIES 5
dk_dk
Super User
Super User

Hi @jytech , I am having a similar issue in principle. Did you ever find a solution?




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

Proud to be a Super User!





v-shex-msft
Community Support
Community Support

HI @jytech,

Please share some dummy data with the expected result to help us clarify your data structure and test coding formula on it.

How to Get Your Question Answered Quickly 
Regards,

Xiaoxin SHeng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Scenario 1: 

  • Spain is selected from the Country slicer.
  • In the Group slicer (column in same table as Country), it displays Group A because before 11/30/2019 it was part of Group A.
  • The Date slicer (DAX created calendar) shows 1/1/2018 - 11/30/2019 and all the data/metrics for that timeframe. For example: Users 1,408 and etc.jytech_3-1595280559074.png

Scenario 2: 

  • Spain is again selected from the Country slicer.
  • In the Group slicer (column in same table as Country), it displays Group B because after 11/30/2019 it is now part of Group B.
  • The Date slicer (DAX created calendar) shows 1/1/2018 - 11/30/2019 and all the data/metrics for that timeframe that correspnd to the date range selected. For example: Users 930 and etc.Untitled.png
 
 

As mentioned in my original post, as an added bonus, it would be great to be able to report Group metrics based on the above. For example, if I select Group A my report will include Spain from 01/2000 to 11/2019, however shouldn't include Spain from 12/2019 and beyond because they are now part of Group B.

 

Does this make more sense? Can anyone help?

Greg_Deckler
Super User
Super User

@jytech - You will probably want to use the Disconnected Table Trick. Basically, you form a relationship between two disconnected tables using a measure. In this way, you can be very exact with regard to how the tables relate to one another. 

 

Disconnected Table Trick as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...

 

Here are additional examples:


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler I appreciate your response but I'm not sure how the Disconnected Table Trick will help me. I posted a follow up to my original post which specifies exactly what I need with some images for reference.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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