Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi
i hope to create a conditionally formatting based on individual column of the matrix table below (preferrably gradient color scale), i.e. 3M within product P, not 3M across both Product P and Product LA...anyone knows how to write a formula for that?
Hi @mogugu_84 ,
As he said, for a customized format for a specific Value in the matrix, you can first determine under which column classification it is located, in the data you provided for Molecule.You can view the following pbix file. If it still doesn't solve your problem, you can provide the full example data and MEASURES, preferably the example pbix file, so we can help you faster.Please hide sensitive information in advance.
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @mogugu_84 ,
You can try this code
Color =
IF(
SELECTEDVALUE('Def market'[Molecule]) <> "Product P",
"No color",
IF(
[3M G%] < 0 ,
"Red",
IF(
[3M G%] <= 0.153,
"Orange",
"Green"
)
)
)
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
thank you, anyway i can make this number dynamic, instead of put it as 15.3%?
Hi @mogugu_84 ,
Sure. You can replace it with measure which you want to compare.
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
I think i need to replace this yellow bit with a new measure that calculates 3M G% ignoring the row label...which is "Account" in this case....can you help with this formula? Thanks again!
Hi @mogugu_84
To achieve this you need to create a measure for backgroud color of 3M for column P only not the L.
Try code pattern below for your case:
If single color:
RevenueColor =
SWITCH(
TRUE(),
SELECTEDVALUE('Calendar'[Quarter]) IN {1, 2}, "#FFCCCB", // Light Red for Q1 and Q2
BLANK() // No color for other quarters
)
If gradient color scale:
RevenueGradientColor =
SWITCH(
TRUE(),
SELECTEDVALUE('Calendar'[Quarter]) IN {1, 2},
VAR RevenueValue = [Revenue]
RETURN
IF(
RevenueValue <= 100000, "#FFCCCB",
IF(
RevenueValue <= 500000, "#FF9999",
"#FF6666"
)
),
BLANK() // No color for other quarters
)
Go to cell element > select measure (In your case 3M) > turn on background color > click fx > select field value > and select newly created measure. See image:
Output:
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Bes Regards,
Shahariar Hafiz
Hi Shafiz
thank you! however, sorry i didn't explain the measure of "3M" properly, it is a calculated value for rolling 3 months vs LY, i.e. Oct 24+Sep 24+Aug 24 vs Oct 23+Sep 23+Aug 23....so the formulas containing 'calendar[quarter]' would not work.....plus i also need to replicate this conditional format process for the value of "Fiscal year to date vs LY, and rolling 12 months vs LY too......
The formula I have provided is just an example, how could you color background of specific measure of a specific column. It does not matter how your measure is evaluating. It is a matter which column and which measure. You can compare measure with other measure or fixed value for gradient color scale. As I understood from your post. Also, calendar[quarter] is my column name to demonastrate the scenario. Your column name is different (from the picture, i can see it is molecule). You need to replace column name and measure name accordingly.
Hope you got the point.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
113 | |
82 | |
45 | |
42 | |
28 |
User | Count |
---|---|
182 | |
83 | |
70 | |
48 | |
45 |