Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hey guys,
I need your help again and this time i need an adjustment of my formula i think.
The question is actually pretty simple but my excisting formula doesn't seem to work.
I have a table with our permits in them with different dates and i want a visual that triggers us if a permit expires within 6 weeks.
So i have a colum whicht has the dates on which an permit expires and i want another column to show the date when we need to extend the permit
Permit | expires on | extend per |
Permit A | 30-06-20 | 19-05-20 |
Permit B | 30-09-20 | 19-08-20 |
Permit C | 30-08-20 | 19-07-20 |
Permit D | 30-12-20 | 18-11-20 |
The trick is that i only want the permits to show where the extend per date is within 6 week from now so i made this formula but it doesn't produce the right result
Solved! Go to Solution.
Hi @RonaldvdH ,
We can create a calculate column to meet your requirement.
Extend permit =
IF(
'Permits'[expires on]<>BLANK(),
IF (
AND (
Permits[expires on] >= TODAY(),
Permits[expires on] <= TODAY() + 42
),
Permits[expires on] - 42
)
)
You can change the date range according to your requirement. The result like this,
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @RonaldvdH ,
We can create a calculate column to meet your requirement.
Extend permit =
IF(
'Permits'[expires on]<>BLANK(),
IF (
AND (
Permits[expires on] >= TODAY(),
Permits[expires on] <= TODAY() + 42
),
Permits[expires on] - 42
)
)
You can change the date range according to your requirement. The result like this,
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@RonaldvdH , Create a measure like this and use it. This should filter
calculate(countrows(Permits),filter(Permits,Permits[Permits expires]<>BLANK() && Permits[Permits expires]<(TODAY()-42)))
@amitchandak i need a calculated column to use in the visual so if your measure can be adjusted it might work
your formula now just counts the number of rows where the formula returns a value instead of a value per row in the database
Try this expression instead
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |