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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have a slicer connected to a "Date" table with a hirarchy of...
Is there a way to create an "IF" measure that can use the slicer selection? Something like IF(Slicer Selection = "1st Half", "Blah", "Blah Bah")
Thanks in advance.
Quick Idea:
I actually have a table that displays the "First" & "Last" date of the slicer selection. Is there a way too use these dates such as
IF(DatesBetween(FirstDate, LastDate)=365, "Year",
IF(DatesBetween(FirstDate, LastDate)=182, "1st Half", and so on,
I could manually work out how many days are in Jan, Feb, Mar, Apr, May & Jun for 1st Half, etc. but is there an automatic way such as a function to callculate dates, to cover leap years, etc.
I am not sure if I will be able to help you to that extent as I am pretty new to Power BI myself. The response that I have given is working perfectly. So do give it a try.
Sorry, our posts crossed. I'll try your solution later and get back to you. Thanks
For doing this for 1st and 2nd Half add that particular hierarchy to the DAX, i.e. Sales[Delivery Date].[Half]