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.
Hi guys,
ran into a problem.
im making a chart that shows if Completion date is between certain dates:
I have done this by making a blank query then adding these formulas:
Source = DateTime.Date(DateTime.LocalNow()
Date.AddMonths([Today], 8)
Date.AddMonths([Today], 18)
I then made a formula for the conditions in the bullet points:
IF(Table1 [Completion Date] < RELATED('Date Revolve'[9 Month Revolve]),"Within 9 Months", BLANK()) &
IF(Table1 [Completion Date] > RELATED('Date Revolve'[18 Month Revolve]), "18 Months +", BLANK())&
IF(Table1 [Completion Date] >= RELATED('Date Revolve'[18 Month Revolve]), "18 Months +", BLANK())
However, 9-18 and 18+ group in the same cells -"9-18 Months18Months +"
The conditions are overlapping.
How could i make it so that the 9-18 one has multiple conditions such as:
I tried using AND but then 9-18 disappears.
= IF(AND(Table1[Completion Date] > RELATED('Date Revolve'[9 Month Revolve]),Table1[Completion Date] < RELATED('Date Revolve'[18 Month Revolve])), "9 - 18 Months", BLANK())
Any ideas?
Solved! Go to Solution.
Hi @paulfink ,
Not need to create relationships between two tables and use RELATED(), you can create a column like this:
Column =
IF (
'Table'[Comp Date] < MIN ( 'Date'[9 Month Revolve] ),
"Within 9 Months",
IF (
'Table'[Comp Date] > MIN ( 'Date'[9 Month Revolve] )
&& 'Table'[Comp Date] < MIN ( 'Date'[18 Month Revolve] ),
"9 - 18 Months",
"18 Months +"
)
)
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @paulfink ,
Not need to create relationships between two tables and use RELATED(), you can create a column like this:
Column =
IF (
'Table'[Comp Date] < MIN ( 'Date'[9 Month Revolve] ),
"Within 9 Months",
IF (
'Table'[Comp Date] > MIN ( 'Date'[9 Month Revolve] )
&& 'Table'[Comp Date] < MIN ( 'Date'[18 Month Revolve] ),
"9 - 18 Months",
"18 Months +"
)
)
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @paulfink ,
You will have to modify your DAX and use the NESTED IF Statements:
IF
(
Table1[Completion Date] < RELATED('Date Revolve'[9 Month Revolve]),
"Within 9 Months",
IF(Table1[Completion Date] >= RELATED('Date Revolve'[9 Month Revolve]) && Table1[Completion
Date] <= RELATED('Date Revolve'[18 Month Revolve]), "9-18 Months", "18 Months +")
)
Thanks,
Pragati
This got all 3 but 18 Months + is showing up on Completion dates that should be under Within 9 Months.
As you can see, there are some 2018, 19, 20 and 21 data that should be going under Within 9 Months. I have tried altering your formula but have had no luck unfortunately.
Hi @paulfink
How have you calculated the following columns:
Thanks,
Pragati
No, i made them in Power Query. They are in a seperate query thats why I have to use the RELATED function
Source = DateTime.Date(DateTime.LocalNow()
Date.AddMonths([Today],8)
Date.AddMonths([Today], 18)
Hi @paulfink ,
I think what is wrong in your above calculation is, you need to add 9 months to the Completion Date column not TODAY's date.
Because in IF-ELSE you are comparing with COMPLETION DATE column.
Basically just create 2 columns in the same table where you have completion date column:
Date.AddMonths(Table1[Completion Date], 9)
Date.AddMonths(Table1[Completion Date], 18)
Then the DAX what I shared should work and will give you right classification.
IF
(
Table1[Completion Date] < 'Table1'[9 Month Revolve],
"Within 9 Months",
IF(Table1[Completion Date] >= 'Table1'[9 Month Revolve] && Table1[Completion
Date] <= 'Table1'[18 Month Revolve], "9-18 Months", "18 Months +")
)
Thanks,
Pragati
Sorry but thats not how we want to see the data. If we change the 9 and 18 month to base it on Completion date, then the figures would stay the same.
Basing it on Todays day would mean the figures would change and we can see what is coming up and what is in the far future.
Hi @paulfink ,
Ok in that case, can you attach some sample data here for me to try it at my end?
Thanks,
Pragati
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.