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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Why this formula does not work, It looks at the condition, if it is true if it will look for the values in the table (day number) compare it smaller to... if yes, zero, if not I take the value in the table (Number of days)
Hi @ERICCFG
@PijushRoy Thank you very much for your prompt reply, please allow me to share some content here.
For your question, here is the method I provided:
Create a measure.
NB JOURS =
var _status = SELECTEDVALUE('MAINT_WORK_REQUEST_V'[STATUS])
var _Nombre = SELECTEDVALUE('MAINT_WORK_REQUEST_V'[Nombre de jours])
RETURN
SWITCH(
TRUE(),
_status = "Urgent" && _Nombre < 1, _Nombre,
_status = "Pressant" && _Nombre >= 3, _Nombre,
_status = "Au cours de la semaine" && _Nombre >= 8, _Nombre,
_status = "Au cours du mois" && _Nombre >= 31, _Nombre,
0
)
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ERICCFG
Please paste the DAX here for rewrite it
Proud to be a Super User! | |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |