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! Learn more
Hello
I have a Contract Assets table that the following columns ;
I also have a Dates, date table.
In PBI Desktop, I want to have a data slicer to obtain the start and end dates in question, from these inputs, I would like the table displaying the above fields, plus a field denoting "Available" or "UnAvailable".
I'm attempting to create a measure that will contain the availability.
Below, is the code that I am working with... I am really new to Power BI and Dax. I was thinking I could add the Available Measure to the table visual. I keep hitting blocks with the below syntax. I was having a challenge with the brackets...
Hi @Waxy ,
You can change the formula to try like this:
Available Measure =
Var MinValue = Min(Dates[Date])
Var MaxValue = Max(Dates[Date])
Var ContractStart = SUM(ContractAssets[StartDate_Copy])
Var ContractEnd = Sum(ContractAssets[EndDate_Copy])
Return
switch(
       true(),
       (ContractStart >= MinValue) and (ContractStart <= MaxValue),'Available',
       (ContractEnd >= MinValue) and (ContractEnd <= MaxValue),'Available',
       (ContractStart <= MinValue) and (ContractEnd >= MaxValue),'Available',
       'Not Available'
)
If my answer is not what you need, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Waxy not sure if it is a typo or you are actually using SUM, it should be MIN or MAX
Var ContractStart = SUM(ContractAssets[StartDate_Copy])
Var ContractEnd = Sum(ContractAssets[EndDate_Copy])
					
				
			
			
				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.
Was having so much grief with this, starting to get confused how to reference a column in a table. StartDate_Copy and EndDate_Copy are the actual columns in the dataset table. Wasn't having much luck so tried to use variables to capture each row. Guess I'm off track?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.