cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
abhishekc1 Frequent Visitor
Frequent Visitor

Dynamically change state based on date slicer - help required

Hi All,

 

I have a table that looks like this:

 

LocationStart Date
loc 11-Jan-19
loc 213-Feb-19
loc 317-Feb-19
loc 41-Aug-18
loc 51-Jun-19
loc 613-May-19
loc 712-Apr-19

 

This table has a one to many relationship with my main data (DATA) table that contains an order date. This DATA table also has a many to one relationship with a date table that i created. I would need your help with the following:

 

I need to add a state to each of these locations based on the date selected using a slicer/filter. The expected output for Feb 2019, May 2019 and June 2019 could be as follows:

 

LocationFeb StateMay StateJune State
loc 1OldOldOld
loc 2NewOldOld
loc 3NewOldOld
loc 4OldOldOld
loc 5Not launchedNot launchedNew
loc 6Not launchedNewOld
loc 7Not launchedOldOld

 

Any help would truly be appreciated. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Dynamically change state based on date slicer - help required

Hi,

You may download my PBI file from here.

Hope this helps.

Project status.png

9 REPLIES 9
Super User
Super User

Re: Dynamically change state based on date slicer - help required

Hi,

You may download my PBI file from here.

Hope this helps.

Project status.png

abhishekc1 Frequent Visitor
Frequent Visitor

Re: Dynamically change state based on date slicer - help required

You are a saviour! I can’t thank you enough for this Ashish. Thanks a lot for taking some time out to help me out
abhishekc1 Frequent Visitor
Frequent Visitor

Re: Dynamically change state based on date slicer - help required

I could use some more help though Ashish. One small modifications i what i am looking for:

 For example: 

 

If the slicer was set for dates between Feb 2019 to May 2019:

 

a) Locations launched in June 2019 - need to be classified as Not yet launched

b) Locations launched in March and April 2019 - need to be classified as New

c) Locations launched before March 2019 -  need to be classified as old

d) Locations launched in May 2019 - need to be classified as Launched this month

Super User
Super User

Re: Dynamically change state based on date slicer - help required

You are welcome.

Super User
Super User

Re: Dynamically change state based on date slicer - help required

Hi,

I can only understand the answer of point a.  I cannot understand the expected answer of b, c and d.  GIven an explanation.

abhishekc1 Frequent Visitor
Frequent Visitor

Re: Dynamically change state based on date slicer - help required

It's the way we classify locations internally. basically, each location is the location of a retail store. Any store that is less than 2 months old is classified as New internally. Could you help me figure it out in this context? I'll try to work on it by modifying the formula from your solution sheet and see if i can get this done. Anyway, thank you so much once again

Super User
Super User

Re: Dynamically change state based on date slicer - help required

Hi

Share some data and in your expected format (with a slicer for time period applied), show the expected output with an explanation.

abhishekc1 Frequent Visitor
Frequent Visitor

Re: Dynamically change state based on date slicer - help required

Hi Ashish,

 

I just used the logic in your file and figured out a solution for my problem. I just created a month index and modified the logic from your solution. I'm very new to all of this so Thank you so much for all the help. Really appreciate it! Also, my apologies for not sharing enough details earlier. 

Super User
Super User

Re: Dynamically change state based on date slicer - help required

You are most welcome.  Glad you could find a solution by yourself.

Helpful resources

Announcements
GregDeckler

How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Ideas
Users Online
Currently online: 27 members 917 guests
Please welcome our newest community members: