This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi there,
I'm struggling with this... I have 2 slicers, 'dateClosed' which is a date table that I created which is linked to the cases table field [date closed]. And another slicer 'dateOpened' which is a date table that I created which is linked to the cases table field ]date opened].
Those 2 slicers get my calculated fields which count all clients within the cases that are still open - meaning where the open date is before dateOpened slicer and closed date is after the dateClosed slicer OR blank. That works with the DAX below:
Solved! Go to Solution.
Hi @gbaia ,
if you need the relationships for some other reasons, try the following:
The result are the following two measures:
Hi @gbaia ,
Thank you @Hans-Georg_Puls for the response provided!
Has your issue been resolved? If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.
Thank you.
Hi @gbaia ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you.
Hi,
Please share some data to work with and show the expected result.
Hi @gbaia ,
if I understand your requirements right and assuming linking means that there is a relationship between the tables, I would recommend a slightly different approach based on the following three steps:
That leads to much easier to understand measures and incidentally to a much better performance avoiding ALL and FILTER.
I built a little demo for you that you find attached.
My measures look like this (where possible I used your notation and names):
@Hans-Georg_Puls thank you so much, that works beautifully without the relationships. But I can't really delete the relationships on my file or it'll break everything else! It's just that card which needs the extra cause.
I've changed the DAX to your DAX and it's better - at least it takes into consideration the last condition which mine didn't. But it still ignores the cases where closed date is blank 😞
Can I get that to work still having the relationship?
Thank you so much!
Hi @gbaia ,
if you need the relationships for some other reasons, try the following:
The result are the following two measures:
@FBergamaschi thank you. The SELECTEDVALUE(CloseDateTable[Date]) is the slicer so I can't remove the selected value and if I put MAX, I'll get the same result. It was painful to get that first DAX to work as Power BI doesn't seem to like blank values being added in additional to other filtering conditions, but it worked fine on the first one.
Just adding that additional clause is proving impossible as it just removes the blanks!
Thank you so much and I'll take a look at your content, thanks 🙂
Hi @gbaia there is surely a solution, if you can pass me the pbix file I can look into that
via private message in case you cannot share it here
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi @gbaia
the problem is surely here
SELECTEDVALUE(CloseDateTable[Date])
this returns probably blank unless you have that column grouped. You should substitute that expression with something like MAX (CloseDateTable[Date]) or something like this (in a card you are not filtering that column so SELECTEDVALUE returns a blank in presence of multiple values available)
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 27 | |
| 26 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 36 | |
| 32 | |
| 26 | |
| 23 |