The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I know it might be difficult to understand the title here...
To illustrate, I have multiple products that will be re-launched in different countries and brands under one big group.
For example, Product A and Product B will be re-launched in a batch under brand a in Brazil while Product C and D will be launched under other brands in other countries some day. What I mean re-launch is that previously these products were already there, it is just like a modification of existing products with seemless time series.
So we can use the re-launch date as Day0, and the first day after re-launch will be Day1, and the day before the re-launch day will be Day-1, etc.
The data schema is like this:
Batch Number | Brand | Product Name | Calendar_Date | Re-Launch Date | Days Since ReLaunched | Sales |
Brand A - 2021-03-04 | Brand A | Product A | 2021-03-03 | 2021-03-04 | -1 | 100 |
Brand A - 2021-03-04 | Brand A | Product A | 2021-03-04 | 2021-03-04 | 0 | 200 |
Brand A - 2021-03-04 | Brand A | Product A | 2021-03-05 | 2021-03-04 | 1 | 300 |
Brand A - 2021-03-04 | Brand A | Product B | 2021-03-03 | 2021-03-04 | -1 | 120 |
Brand A - 2021-03-04 | Brand A | Product B | 2021-03-04 | 2021-03-04 | 0 | 300 |
Brand A - 2021-03-04 | Brand A | Product B | 2021-03-05 | 2021-03-04 | 1 | 350 |
To evaluate the impact of the post-relaunch period vs previous period. I created a table using the function of
GENERATESERIES(-180, 180, 1)
And I created a measure using
SELECTEDVALUE('Days Since Switched Period'[Days Number])
Then I link this column in the model to Days Since ReLaunched so that if I use slider to change the Days Number, everything will be changed.
The expected outcome is that we can evaluate the pre and post lift rate in sales.
As you can see below, it seems the post launch is not ideal when the day range is between -180 and +180 days. Howver, it is not true as some of the products for example just re-launched in just 17 days but it has a history of almost 1 year before the relaunch. So the pre period is summed up which makes the pre period much larger than the post period. Do you have any idea how to remove those products that they have not achieved the max selected day number? Thanks.
Solved! Go to Solution.
Hi @zakkyang ,
Please try the following formula and show items when the measure is not blank.
Measure =
VAR tab =
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Product Name] = MAX ( 'Table'[Product Name] )
)
VAR Precount =
MINX ( tab, 'Table'[Days Since ReLaunched] )
VAR Aftcount =
MAXX ( tab, 'Table'[Days Since ReLaunched] )
RETURN
IF ( Precount = -1 * Aftcount, 1 )
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @zakkyang ,
Please try the following formula and show items when the measure is not blank.
Measure =
VAR tab =
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Product Name] = MAX ( 'Table'[Product Name] )
)
VAR Precount =
MINX ( tab, 'Table'[Days Since ReLaunched] )
VAR Aftcount =
MAXX ( tab, 'Table'[Days Since ReLaunched] )
RETURN
IF ( Precount = -1 * Aftcount, 1 )
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
"Then I link this column in the model"
Which column ? From the Generateseries table?