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.
Greetings to all, I hope you will be all right!
I would currently like to know if it is possible to conditionally format two or more values in a single array.
My example case is as follows: I have a product in different stores and I know which ones it has been sold in(1), it is sold out(2) and it is not sold(3).
Understanding that the product can be sold and sold out in a set time, when establishing the matrix by store and product, can I reflect the two possibilities of the product of the same store under a conditional format?
I hope the example is clear and you can support me.
Greetings and thanks!
Solved! Go to Solution.
HI @Eddlugonz
Hope you mean in a sinle array is a single column.
Create a measure as
sold_stat = SWITCH(true(),
[col1] = "Sold",1,
[col1] = "Sold out",1,
[col1] = "Not Sold",1,0)
You change chage your conditions as per your requirement. this is what I could make out of it.
Then in the table or matrix go to formatting and Conditional formatting.
Select sold_stat and apply the format.
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
@Eddlugonz , Usually for the complex case I prefer the "Field value" Option in conditional formatting and use a measure with that.
With the current description, I am not able to suggest a measure. But refer to these examples.
Color Year = if(FIRSTNONBLANK('Table'[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK('Table'[Year],2014)>2018,"red","yellow"))
Color = if(FIRSTNONBLANK('Table'[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
,"lightgreen",if(FIRSTNONBLANK('Table'[Year],2014)>2018,"red","yellow"))
Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")
You can use meausres and dimesnions values with max/min/firstnonblank/lastnonblank etc.
Refer how to use here
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
In case you think this what can help you, see how the row context play a role in conditional formatting: https://youtu.be/Q1vPWmfI25o?t=2770
HI @Eddlugonz
Hope you mean in a sinle array is a single column.
Create a measure as
sold_stat = SWITCH(true(),
[col1] = "Sold",1,
[col1] = "Sold out",1,
[col1] = "Not Sold",1,0)
You change chage your conditions as per your requirement. this is what I could make out of it.
Then in the table or matrix go to formatting and Conditional formatting.
Select sold_stat and apply the format.
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |