Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Guys,
I've an issue trying to calculated column that's dynamic to a date chosen from a slicer.
I've managed to create a formula that gives the Max date of the slicer range and then go back 1 year.
Were I'm struggling is created a calculated column based on that determine if a product is "new" or "existiing"
For example:
Product A was launched on 1st July 2021.
If the slicer date range has a maximum value of 31st May 2021 - the product should be classed as "new" - launched in the last 12 months
If the slicer date range then changes to 20th July 2021 - it changes to "existing" as the launch date was greater than 12 months ago.
Hope that makes sense?
Any help is greatly appreciated.
Many Thanks
Ewan
Solved! Go to Solution.
Hi - I managed to fix this another way using the Datebetween formula in DAX, and is giving the desired result.
THanks
Ewan
Hi - I managed to fix this another way using the Datebetween formula in DAX, and is giving the desired result.
THanks
Ewan
Hi @EwanE ,
Happy to ear that but just one the calculated column isn't recalculating according to the date slicer correct? the values are fixed.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix, thank you for getting to me.
Please see an example table below
| Product Code | First Invoice Date | Classification |
| 1 | 17-May-22 | New |
| 2 | 12-May-22 | New |
| 3 | 11-May-22 | New |
| 4 | 27-Apr-22 | New |
| 5 | 20-Apr-22 | New |
| 6 | 19-Apr-22 | New |
| 7 | 19-Apr-22 | New |
| 8 | 06-Apr-22 | New |
| 9 | 06-Apr-22 | New |
| 10 | 21-Mar-22 | New |
The looking to make the Classification dynamic based on the date in a slicer. If the First Invoice Date - which is Fixed is older than 12 months from the slicer it is classified as an "existing" product. if less than 12 months old, then it's classed as "new"
Hope that makes sense.
Kind Regards,
Ewan
Hi @EwanE ,
Calculated columns cannot be created based on slicers, because you are refering to different context.
For this you need to create another measure that will then be calculated based on the slicer.
Can you share some sample data to get the correct measure syntax please.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCheck out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!