Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello
I have got a table that contains contract expiry dates. Would like to create a new column that identifies contracts as
My final output is creating a matrix table that counts the number of contracts falling in the four categories above.
Can anyone help with the steps to get this output?
Hi,
Please check the below picture and the attached pbix file.
Contracts count: =
CALCULATE (
COUNTROWS ( VALUES ( Data[Contract] ) ),
FILTER (
Data,
CALCULATE (
COUNTROWS ( Category ),
FILTER (
Category,
Data[Expiry date] - TODAY () >= Category[Min period]
&& Data[Expiry date] - TODAY () <= Category[Max period]
)
) > 0
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
pls try this
category =
VAR gap='Table'[expiry date]-TODAY()
return SWITCH(TRUE(),gap<0,"expired",gap<=90,"Expiring in 90 Days",gap<=180,"Expiring in 180 Days","Expiring 180 days +")
Proud to be a Super User!
Hi Ryan,
Tried the formula but it throws up errors, am I entering it correctly?
try to use DAX to create a column, not in the PQ editor.
Proud to be a Super User!