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.
Hi there! I have a field called 'Stage' with three different values, 'Complete', 'Execution' and 'Approved'. If an item is 'Approved' I would like to use the value in a field called Total Project Spend, BUT if the value is 'Complete' or 'Execution' then I'd like to use the value in a field called Combined LBE. Is there a way to apply this logic to a visualization? Please let me know what you think. Thanks!
Solved! Go to Solution.
Thanks for the guidance! Here's what I ended up getting to work:
#"Added Custom1" = Table.AddColumn(#"Changed Type1", "NewMoney", each if [Stage] = "Approved" then [TotalProjectSpend] else [Combined LBE]),
#"Changed Type2" = Table.TransformColumnTypes(#"Added Custom1",{{"NewMoney", Currency.Type}})
Sounds like you need to create a custom column with an IF statement. This would be something like
OutputField = IF( [Stage] = "Approved", [Total Project Spend], [Combined LBE] )
This code assumes all your fields are in the same table. If they are not, you'll need to expand on the DAX code.
Thanks for the guidance! Here's what I ended up getting to work:
#"Added Custom1" = Table.AddColumn(#"Changed Type1", "NewMoney", each if [Stage] = "Approved" then [TotalProjectSpend] else [Combined LBE]),
#"Changed Type2" = Table.TransformColumnTypes(#"Added Custom1",{{"NewMoney", Currency.Type}})
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 |
---|---|
114 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |