Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
=IF(M4>0, "P",IF((L4-M4)>0, "AP", [@[Fin Year]])) in excel is working but BI it is not working the formula
Solved! Go to Solution.
Hi, @sameergupta60
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
bar-1:
If you want to create a calculated column with dax, you may try the following codes.
Result =
IF(
'bar-1'[PPCJU1]>0,
"P",
IF(
'bar-1'[PPCYTD]-'bar-1'[PPCJU1]>0,
"AP",
CONCATENATE('bar-1'[Fin year],"")
)
)
If you want to create a custom column in Power Query, you may create a custom column with the following codes.
=if [PPCJU1]>0 then "P" else if ([PPCYTD]-[PPCJU1])>0 then "AP" else Text.From([Fin year])
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @sameergupta60
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
bar-1:
If you want to create a calculated column with dax, you may try the following codes.
Result =
IF(
'bar-1'[PPCJU1]>0,
"P",
IF(
'bar-1'[PPCYTD]-'bar-1'[PPCJU1]>0,
"AP",
CONCATENATE('bar-1'[Fin year],"")
)
)
If you want to create a custom column in Power Query, you may create a custom column with the following codes.
=if [PPCJU1]>0 then "P" else if ([PPCYTD]-[PPCJU1])>0 then "AP" else Text.From([Fin year])
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
thank you so much for the help.
i have one more query can you guide us.
Colour Project1 =
VAR Dept =
SELECTEDVALUE( 'bar-1'[Slab Data] )
RETURN
Switch(True(),
Dept = "P", "#FFFFFF",
Dept = "-" , "#89de21",
Dept >"0-" , "#89de21",
Dept = "`", "#FFE12D",
Dept = ".","#d9dedd",
Dept = ",","#f56342"
)
in that, I have a colour cell but unable to colour the number 22,23 in a different colour can help us.
yes, I want a power query.
Please help on above dax
Can you please guide on above Dax issue
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 11 | |
| 5 | |
| 4 | |
| 3 |