Power BI Conditional formatting using Measures

  Рет қаралды 14,791

Access Analytic

Access Analytic

Күн бұрын

⚡⚡⚡More information in the description below⚡⚡⚡
The team and I at Access Analytic develop Power BI and Excel solutions for clients in Australia and deliver training around the World. accessanalytic...
⏬Download a copy of my demo file
aasolutions.sh...
🖌️Power Toys (Colour Picker)
learn.microsof...
Did you know I've written a book "Power BI for the Excel Analyst"?
pbi.guide/book/
Connect with me
wyn.bio.link/

Пікірлер: 63
@BrianHurn
@BrianHurn 10 ай бұрын
This is a great explanation of the idea. Here are some bonus tips: 1. Power BI supports 8-character RGBA (Red Green Blue Alpha) hex codes, so you can append a 00 to the end of the hex code to make formatted items transparent, FF to make them fully opaque (the default if omitted), or any value in between. This is a great way to make things appear, disappear, or fade based on any condition you can code in a measure. 2. You can add a color column to a dimension table to associate colors with a selected item by creating a measure that uses SELECTEDVALUE on that color column. I do this with brand colors sampled from the web, and it's a highly efficient way to color code a column chart (with brand on the x-axis) or a card value based on the associated company.
@AccessAnalytic
@AccessAnalytic 10 ай бұрын
Nice tips Brian. Thanks for the inspiration.
@lape36
@lape36 10 ай бұрын
Hi Brian Very interesting tips. I'm quit interested in your bonus tip #2, can you elaborate on the SELECTEDVALUE measure and where to apply this when using legend in a stacked bar chart? Possible link to a tutorial?
@CasperSeve
@CasperSeve 10 ай бұрын
Have the same challenge as @lape36 - How do you do this on a stacked column bar chart for each series?
@BrianHurn
@BrianHurn 10 ай бұрын
@@CasperSeve @lape36 You can use a measure defined as SELECTEDVALUE(dim[Color]) (with your actual table and color value column names) wherever color conditional formatting is available. I too find it frustrating that many visuals don't support this capability yet.
@CasperSeve
@CasperSeve 10 ай бұрын
@@BrianHurn Hmm - did not work. I don't even see an ability to select conditional formatting by fx on color on the columns when I have a legend applied.
@robrayborn1349
@robrayborn1349 10 ай бұрын
Bloody brilliant! AND, I'm happy to know that I'm not the only one that thinks the imbedded Conditional Formatting in Power BI is a pain. I will keep this video in my favourites and reference it often. Thank you!
@AccessAnalytic
@AccessAnalytic 10 ай бұрын
You’re very welcome. I appreciate you taking the time to let me know you found it useful
@zzota
@zzota 10 ай бұрын
I've used single measures for conditional formatting, but your combined measure if far superior! Thanks Wyn.
@AccessAnalytic
@AccessAnalytic 10 ай бұрын
You’re welcome
@WendyLockhart-h6w
@WendyLockhart-h6w 2 ай бұрын
I was struggling with a homework assignment for conditional formatting using measures and I had forgotten the hashtags in the hexcodes!! Thank you for fixing this for me!!!
@AccessAnalytic
@AccessAnalytic 2 ай бұрын
Glad to help 😀
@huseyinburaktasci
@huseyinburaktasci 9 ай бұрын
That's a great solution I have been looking for. I was searching for how to demonstrate the actual and budget comparison for the periods past so far. Thanks to your content, I will create a parameter that will highlight past periods with different colors. Regards. :)
@AccessAnalytic
@AccessAnalytic 9 ай бұрын
Glad to help. I appreciate you taking the time to let me know you found it useful
@lape36
@lape36 10 ай бұрын
Hi Wyn Thanks for a good explanation. Can you provide instruction on potential similar method when using a stacked bar chart where each "series" defined by the legend need to have a specific color? I'm looking for a method where lines in line chart, pies in pie char and bar in bar chart used the same specific colors for specific "series" defined in the legend throughout the report.
@AccessAnalytic
@AccessAnalytic 10 ай бұрын
Check out Brian’s pinned comment in this comments section
@krishnaRaog21
@krishnaRaog21 10 ай бұрын
I am a big fan of yours ...Like your tutorials
@AccessAnalytic
@AccessAnalytic 10 ай бұрын
Great to hear. Glad you enjoy them 🙏🏼
@JuanIArana
@JuanIArana 9 ай бұрын
Great explanation Wyn !!!
@AccessAnalytic
@AccessAnalytic 9 ай бұрын
Thank you
@unnikrishnansanthosh
@unnikrishnansanthosh 10 ай бұрын
super clear explanation, one for my next db
@AccessAnalytic
@AccessAnalytic 10 ай бұрын
Glad to help
@workstuff5253
@workstuff5253 10 ай бұрын
I'm glad you called out the Rules based formatting as being utter garbage.
@martyc5674
@martyc5674 10 ай бұрын
It is pure Junk! - they really need to improve it, I can never get my head around it!!
@AccessAnalytic
@AccessAnalytic 10 ай бұрын
I don’t see it happening sadly
@marlongardley
@marlongardley Ай бұрын
Awesome explanation
@AccessAnalytic
@AccessAnalytic Ай бұрын
Cheers
@katerynapopovych1637
@katerynapopovych1637 3 ай бұрын
Hi and thanks for a great tutorial! What is the correct way to add more number intervals and thus colors to this measure?
@AccessAnalytic
@AccessAnalytic 3 ай бұрын
You would edit the formula to add more conditions at 2:17
@kensimpson6659
@kensimpson6659 6 ай бұрын
Great tool! I'm using this to highlight errors vs threshold. In my application, if errors exceed threshold, then highlighted red (out of spec). Some errors do not have thresholds, so these should not be highlighted. What can I add so these fields are not formatted?
@AccessAnalytic
@AccessAnalytic 6 ай бұрын
Maybe some sort of early if statement to check if error should be evaluated. A helper column with a y/n flag might help with this.
@kensimpson6659
@kensimpson6659 5 ай бұрын
@@AccessAnalytic Added the statement IF(NOT(ISBLANK([MEASURE])) at the beginning and it worked flawlessly.
@AccessAnalytic
@AccessAnalytic 5 ай бұрын
@@kensimpson6659 Great, glad you got it working
@bhaskaraggarwal8971
@bhaskaraggarwal8971 5 ай бұрын
Awesome✨. Thanks for sharing. Just one question - I need to format 15 measures with the same ranges. Is it possible to create one dax cf-measure and use it for formatting multiple measures or I have to create 15 cf -measures?
@AccessAnalytic
@AccessAnalytic 5 ай бұрын
Not that I’m aware of unless you write a script to do it in Tabular editor ( external tool )
@bhaskaraggarwal8971
@bhaskaraggarwal8971 5 ай бұрын
Thank you. Appreciate it!
@AccessAnalytic
@AccessAnalytic 5 ай бұрын
@bhaskaraggarwal8971 look up Sue Bayes on LinkedIn - I think she said she wrote a script to do this just the other week
@bhaskaraggarwal8971
@bhaskaraggarwal8971 5 ай бұрын
@@AccessAnalytic - Sure. I will reach out to her. That's so nice of you to help
@lloydstoner5872
@lloydstoner5872 6 ай бұрын
Great tip. I'm new to PowerBi and this was super simple to follow. One question: Given I have a lot of switch conditions (due to a lot of colours) - is there a way to get the measure to return a colour based on lookup from a table ?
@AccessAnalytic
@AccessAnalytic 6 ай бұрын
Do you mean looking up the colour for Good, Bad, Average etc. or a colour code listing based on the column name, or a sliding scale, so like a 0-100 RED, 100-200 yellow etc
@FranzL608
@FranzL608 7 ай бұрын
This is a great suggestion. Really useful. I tried to create some kind of Income statement and colour the subtotals. But it does not work. I have the cf measure, I have the value measure (and if I put both in the value section the cf colour value is displayed as expected) but when entering the cf measure as background colour function ... nothing happens. Any idea why?
@FranzL608
@FranzL608 7 ай бұрын
Sorry, I think I found the issue: multiple rows. I have the following cf measure: cf=switch( max([header]), "Net Sales", "#b1f1ea", ...) It works if I have only one header in the row area. If I expend the row area for a subheader, the cf does not longer work. How can I force PBI to ignore any additional fields in the row area? And, is it possible to conditionally format the rows as well?
@AccessAnalytic
@AccessAnalytic 7 ай бұрын
Good questions but I don’t know the answers sorry.
@wojtektopiko5677
@wojtektopiko5677 10 ай бұрын
Thanks! Can you suggest a way to create a conditional formatting measure / rule without having to refer to a specific measure?
@AccessAnalytic
@AccessAnalytic 10 ай бұрын
What would the rule / use case be?
@wojtektopiko5677
@wojtektopiko5677 10 ай бұрын
​ @AccessAnalytic Sorry, I am just starting with DAX and might be not precise in formuling the questions. I meant the cf without fixed measure it's reffering too. For example replacing definied measure in VAR _Measure = [Usage v Prior Year] with something like SELECTEDMEASURE. I could create one universal conditional formatting measure, instead of multiple ones for each of the calculation measures.
@AccessAnalytic
@AccessAnalytic 10 ай бұрын
@wojtektopiko5677 not that I know of
@wojtektopiko5677
@wojtektopiko5677 10 ай бұрын
@@AccessAnalytic thanks a lot :-)
@bloodomen6919
@bloodomen6919 9 ай бұрын
Ty Sir ! I have tried to replicate it on my end and i cant select the Cf measure as a conditional formatting independent of the visual i use. the measure is not grayed out , but when i select it nothing happens and i can't select it. any recommendations ?
@AccessAnalytic
@AccessAnalytic 9 ай бұрын
Not sure sorry, maybe post a screenshot to www.reddit.com/r/PowerBI/
@bloodomen6919
@bloodomen6919 6 ай бұрын
@@AccessAnalytic i think the issue for me is that i am using calculation items where i want to apply the cf. Do you have any ideea how can we adapt it ? Please ? ty once again for everything you do for the community.
@AccessAnalytic
@AccessAnalytic 6 ай бұрын
Sorry I don’t understand still
@bloodomen6919
@bloodomen6919 6 ай бұрын
I am using a matrix and calculation group item as values. When i am trying to select the measure and to use it as field i can't select the measure that applies the CF. did i explained it better ?
@AccessAnalytic
@AccessAnalytic 6 ай бұрын
It’s not something I have experience of sorry
@reanalytics1863
@reanalytics1863 6 ай бұрын
I have this measure that returns text such as 50/12% BAC+ = IF([# BAC+]>0, FORMAT([# BAC+],"0") & "/" & FORMAT([% BAC+],"0%"),"") I want to conditionally format this measure using the following measure Met Bac+ target = IF( [bac+ target]
@AccessAnalytic
@AccessAnalytic 6 ай бұрын
I’m not quite following by maybe you need to read up on dynamic format strings? learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings
@muhammadsadiq8885
@muhammadsadiq8885 3 ай бұрын
Nice
@AccessAnalytic
@AccessAnalytic 3 ай бұрын
Ta
Power BI: Show Last Refresh - Using UtcNow
7:48
Access Analytic
Рет қаралды 7 М.
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Power BI Conditional Text Formatting Made Easy
10:22
superdatabrothers
Рет қаралды 72 М.
SWITCH Function in Power Query
10:24
Goodly
Рет қаралды 38 М.
Default your Date Time Slicer Selection to a Current Period in Power BI!
10:30
Top 10 Power BI Features You Should Be Using Right Now!
17:24
How to Power BI
Рет қаралды 107 М.
Visual Calculations in Power BI
8:51
Access Analytic
Рет қаралды 44 М.
How to Conditional Format CALCULATION GROUP Columns in Power BI
11:19
STOP Using Power BI Default Cards - DO This Instead!
21:01
From Zero2BI Hero with Stelian
Рет қаралды 10 М.
Extract Power BI data & measures with Power Automate
17:15
Access Analytic
Рет қаралды 10 М.
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН