Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
hi,
I am new to PowerBI so would welcome some help please!
nameTable:
Name | Start Date | End Date |
John | 01/05/2012 | 23/05/2023 |
Paul | 25/09/2015 | 01/06/2024 |
Peter | 31/03/2016 | 02/09/2021 |
Iain | 01/08/2013 | 03/08/2026 |
I have a simple table (called nameTable), and a slicer based on the column: Name
What i am trying to create is also a Date Slicer linked to a calendar table, where the start and end date comes from my nameTable.
So basically, if i select Paul in the slicer, a seperate Date Slicer will have the Start and End dates 25/8/2015 and 01/06/2024 respectively.
Welcome any help....
Many thanks
Tim
Solved! Go to Solution.
This is the closest I can get to dynamic date.
I see no way to have this in a slicer because it doesn't work with measures, sorry about that!
Hello team, i don't know if this will works as you want but try to do this:
I have used 3 Slices - First for Name Column, second for Start Date and Third for End Date Column. After this i have put a Square form without fill so the result is showed in image below:
After creating this elements you have to Edit interaction of Stard Date Slicer and End Date Slicer to Name Slicer as showed as follow:
After this, when you select a name on Name Slicer for example John, the result is that:
I have selected John and the Slicer Start Date and End Date are showing only the dates of John.
I hope i've helped.
Thanks for that.......
I really did not want to have another slicer......
I was trying to do it with this:
Table =
VAR StartDate= Selector[Start Date]
VAR EndDate= Selector[End Date]
RETURN
CALENDAR(StartDate,EndDate)
It works with the Start Date (if i replace the above with VAR EndDate="31/3/2022") but not as detailed above!
I am getting so frustrated!
Any help please.......
Thanks
Hi @timknox
Unfortunately that won't work using a table, it is loaded once and slicers won't affect it.
Also, Slicer only work with column value. However you could have a table chart with your date field and a measure as a visual filter, would that do?
is it possible to show me how to do that - sorry i am not good at this!
Sure,
Have a look at the pbix in the link
https://1drv.ms/u/s!As5oZCclkGkWgSTanlDS9mHENg4u
I have created the following measure
Is In Date Range =
IF(
AND(SELECTEDVALUE('CALENDAR'[Date])>=MIN(Employee[Start Date]),
SELECTEDVALUE('CALENDAR'[Date])<=MAX(Employee[End Date])
),
"Y",
"N"
)
Beware that if you select two employees or more, your date range will be the earliest/latest of any of them combined. You could use SELECTEDVALUE to go for an alternative value.
I have added this measure to a table chart and have a filter on the visual.
Wow - i think you have nearly solved it!
Can i now turn that into a date slicer?
This is the closest I can get to dynamic date.
I see no way to have this in a slicer because it doesn't work with measures, sorry about that!
what is the end goal?
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |