Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi good day can someone help me on my calculated column or can i do the same in PQ.
- IF the Progress is Negative and the Work % equal to 100 then used the Plan value, IF the Work % is not equal to 100 then copy the Progress value
RESULT
Thank you
Solved! Go to Solution.
Hi @AllanBerces
You can add custom column with the formula :
if [Progress]<0 and [#"Work %"]=100 then [Plan]
else [Progress]
Please note :
You don't need a column if the goal is to put the calculation in visualization, you can just create a measure like :
test measure =
if( max('Table'[Progress])<0 && max('Table'[Work %])=100,sum('Table'[Plan]),sum('Table'[Progress]))
More information about differenses between calculated columns vs measures here :
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
The pbix with the example is attached
you can try this
= if [Progress]<0 and [#"Work%"]=100 then [Plan] else if [#"Work%"] = 100 then [Progress] else if [#"Work%"]=0 then [Plan] else [Progress]
Proud to be a Super User!
Hi again , then the formula will be :
PQ:
You can add custom column with the formula :
if [Work%]<0 =0 then [Plan]
else [Progress]
Dax :
Test measure =
if( max('Table'[Work %])=0,sum('Table'[Plan]),sum('Table'[Progress]))
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Hi @AllanBerces
You can add custom column with the formula :
if [Progress]<0 and [#"Work %"]=100 then [Plan]
else [Progress]
Please note :
You don't need a column if the goal is to put the calculation in visualization, you can just create a measure like :
test measure =
if( max('Table'[Progress])<0 && max('Table'[Work %])=100,sum('Table'[Plan]),sum('Table'[Progress]))
More information about differenses between calculated columns vs measures here :
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
The pbix with the example is attached
Hi @Ritaf1983 thank you very much for the reply, a follow up query if i want to add new condition (IF the Work % is equal to 0 then copy the Plan Value else Progress Value). Thank you
Hi again , then the formula will be :
PQ:
You can add custom column with the formula :
if [Work%]<0 =0 then [Plan]
else [Progress]
Dax :
Test measure =
if( max('Table'[Work %])=0,sum('Table'[Plan]),sum('Table'[Progress]))
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
you are welcome
Proud to be a Super User!
you can try this
= if [Progress]<0 and [#"Work%"]=100 then [Plan] else if [#"Work%"] = 100 then [Progress] else if [#"Work%"]=0 then [Plan] else [Progress]
Proud to be a Super User!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 68 | |
| 32 | |
| 27 | |
| 25 |