Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi everyone,
I am trying to get the difference of a list at two different date.
I have as input a table containing a field with the name of the use cases and another one containing the date.
I would like to be able to get the differences between two dates (variables) but I am struggling. The dates will be selected with slicers.
The solution I have for the moment implies the creation of 4 calculated tables and is not dynamic (take always with min and max dates without taking into consideration the slicers selection).
Thank you in advance for your support
Solved! Go to Solution.
@AntoineTRICHET here it is:
Value Date 1 =
VAR __selectedDate = SELECTEDVALUE(DateTable1[Date])
VAR __table = CALCULATETABLE ( VALUES ( YourTable[UseCase] ), YourTable[Date] = __selectedDate )
RETURN
CONCATENATEX ( __table , [UseCase], "," )
Value Date 2 =
VAR __selectedDate = SELECTEDVALUE(DateTable2[Date])
VAR __table = CALCULATETABLE ( VALUES ( YourTable[UseCase] ), YourTable[Date] = __selectedDate )
RETURN
CONCATENATEX ( __table , [UseCase], "," )
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@AntoineTRICHET here it is:
Value Date 1 =
VAR __selectedDate = SELECTEDVALUE(DateTable1[Date])
VAR __table = CALCULATETABLE ( VALUES ( YourTable[UseCase] ), YourTable[Date] = __selectedDate )
RETURN
CONCATENATEX ( __table , [UseCase], "," )
Value Date 2 =
VAR __selectedDate = SELECTEDVALUE(DateTable2[Date])
VAR __table = CALCULATETABLE ( VALUES ( YourTable[UseCase] ), YourTable[Date] = __selectedDate )
RETURN
CONCATENATEX ( __table , [UseCase], "," )
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@AntoineTRICHET explain with an example when you have selected two dates, it returns what value? You need to explain what you are looking for, it is not very clear from your original post,
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Please find a picture with more explanations
@AntoineTRICHET you need to have two date tables to select the date and then add following measure:
Value Date 1 =
VAR __selectedDate = SELECTEDVALUE(DateTable1[Date])
RETURN
CALCULATE ( MIN ( YourTable[UseCase] ), YourTable[Date] = __selectedDate )
Value Date 2 =
VAR __selectedDate = SELECTEDVALUE(DateTable2[Date])
RETURN
CALCULATE ( MIN ( YourTable[UseCase] ), YourTable[Date] = __selectedDate )
You can add a date table by following my blog post here Create a basic Date table in your data model for Time Intelligence calculations | PeryTUS IT Solutio...
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k
Thank you for your prompt answer.
I completely understand your answer. But I am not sure it will return a list of use case (type text) : I don't want the "min" value, I want to see all values. And I want to have the difference between the two results of the two measures you proposed.
Check 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!