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.
Hello Buddies,
I am stuck with one problem. Let me explain to you with my scenario.
Below is the data which I need to import to my Power Bi dashboard in Table Visualization:-
Parameters | Location 1 | Location 2 |
pH | 7 | 8 |
Turbidity | 40 | 60 |
For the indication purpose, I need icon or colour change in the number to depend upon below conditions:-
pH for Location 1 (less than 6 in Red, between 6 to 7 in Orange & greater than 7 in Green) & for Location 2 (less than 7 in Red, between 7 to 8 in Orange & greater than 8 in Green)
Turbidity for Location 1 (less than 50 in Red, between 50 to 60 in Orange & greater than 60 in Green) & for Location 2 (less than 60 in Red, between 60 to 70 in Orange & greater than 70 in Green)
As of now, I can see conditional formatting respective to one full column or row only. Not for the respective row value or position. Waiting for the solution.
Thanks and Regards,
S
Solved! Go to Solution.
Hi , @Sumeesh
Try steps as below:
step1.create a color measure as below:
Color Location1 =
VAR a =
CALCULATE (
SUM ( 'Table'[Location1] ),
FILTER ( 'Table', 'Table'[Parameter] = "pH" )
)
VAR b =
CALCULATE (
SUM ( 'Table'[Location1] ),
FILTER ( 'Table', 'Table'[Parameter] = "Turbidity" )
)
VAR c =
SWITCH (
MAX ( 'Table'[Parameter] ),
"pH", IF ( a <= 6, "#FF0000", IF ( a <= 7, "#FFA500", "#00FF00" ) ),
"Turbidity", IF ( b <= 50, "#FF0000", IF ( b <= 60, "#FFA500", "#00FF00" ) )
)
RETURN
c
step2.And apply it to conditional formatting ( location1)
step3. And do the same steps to apply it to column location2
Here is a demo.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi , @Sumeesh
Could you please tell me whether your problem has been solved?
If it is, please mark the helpful replies or add your reply as Answered to close this thread.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi , @Sumeesh
Try steps as below:
step1.create a color measure as below:
Color Location1 =
VAR a =
CALCULATE (
SUM ( 'Table'[Location1] ),
FILTER ( 'Table', 'Table'[Parameter] = "pH" )
)
VAR b =
CALCULATE (
SUM ( 'Table'[Location1] ),
FILTER ( 'Table', 'Table'[Parameter] = "Turbidity" )
)
VAR c =
SWITCH (
MAX ( 'Table'[Parameter] ),
"pH", IF ( a <= 6, "#FF0000", IF ( a <= 7, "#FFA500", "#00FF00" ) ),
"Turbidity", IF ( b <= 50, "#FF0000", IF ( b <= 60, "#FFA500", "#00FF00" ) )
)
RETURN
c
step2.And apply it to conditional formatting ( location1)
step3. And do the same steps to apply it to column location2
Here is a demo.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply.
But i am unable to select Colour Location1 in Based on filed drop down (Background colour - Location1) in condtional formatting section Step 2.
Please refer the snapshot. Let me know if you need powerbi file from my side for detail view.
Thanks and Regards,
Sumeesh
Hi, @Sumeesh
It is likely that there are some problems with measure.
Can you show me the formula of your measure and your current table visualization.
Best Regards,
Community Support Team _ Eason
@Sumeesh ,Refer if this can help :https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting
Check by Rule and by Value.
By value you can also create a measure like
Color Date = if(FIRSTNONBLANK('Date'[date],TODAY()) <today(),"lightgreen","red")
Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
Color Year = if(FIRSTNONBLANK('Date'[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK('Date'[Year],2014)>2018,"red","yellow"))
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |