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,
Im trying to add a column to contain one of three numbers (1,2,3) to use for conditonal formatting.
I have several Risk columns in which can be either "please update, High, Medium, Low"
If one of the columns contains a high then it needs to be a 1 regardless of the others.
I have managed to use a conditional column for one but i cant seem to get the syntax correct to look at multiple columns
= Table.AddColumn(#"Filtered Rows", "Custom", each if [RISK_LEVEL] = "High" then 1 else if [RISK_LEVEL] = "Medium" then 2 else if [RISK_LEVEL] = "Low" then 3 else null)
Any help would be much appreciated as i am sure im just missing somethign very simple.
Solved! Go to Solution.
@the606 , I typically use a measure approach. I create a measure and use that in conditional formatting using "Field Value" option
color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"lightgreen",
// Add more conditions
"red"
)
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
@the606 You probably want to create a "flag" measure that returns, for example 1 or 0 depending on what color you want to set. So, something like:
Flag Measure =
VAR __Calc = <some calculation>
RETURN
IF(__Calc > <something>,1,0)
@the606 , I typically use a measure approach. I create a measure and use that in conditional formatting using "Field Value" option
color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"lightgreen",
// Add more conditions
"red"
)
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
great thanks ill give that a go.
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |