Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
sonya7
Helper III
Helper III

Making High/Low balls green-red on the line chart.

 How can I make a graphical representation of any KPI to be selected on the line chart where total orders values ​​are displayed monthly, in a way that makes the highest value within the months green, the lowest value red and the remaining gray?

 

my pbix : https://drive.google.com/file/d/1Vn8KcHdnDxxv70hCMcUU5BCHtNwzqYxV/view?usp=drive_link

 

 

1 ACCEPTED SOLUTION

Bar color = 
var a = CALCULATETABLE(SUMMARIZECOLUMNS(DimDate[YearMonth],DimDate[YearMonthNumber]),allselected())
var b = FILTER(ADDCOLUMNS(a,"sm", [Total Revenue]),[sm]>0)
var t = [Total Revenue]
return switch(TRUE(),
t = MINX(b,[sm]),"red",
t = maxx(b,[sm]),"lightgreen",
"lightgrey")

View solution in original post

8 REPLIES 8
lbendlin
Super User
Super User

I could swear this was possible before but somehow the marker colors are no longer dynamic.  No idea what is happening here.

 

lbendlin_0-1699130387307.png

It works with columns 

 

lbendlin_1-1699131091981.png

Bar color = 
var a = CALCULATETABLE(SUMMARIZECOLUMNS(DimDate[Date]),REMOVEFILTERS(DimDate[Date]))
var b = ADDCOLUMNS(a,"sm", CALCULATE([Total Revenue]))
var t = [Total Revenue]
return switch(TRUE(),
t = MINX(b,[sm]),"red",
t = maxx(b,[sm]),"lightgreen",
"lightgrey")

hi , I want to show my chart month-year. (Sep 18, Sep 19 etc. ) When all years are selected, the column in the month with the maximum value will be red. 

I want to show my chart month-year. When all years are selected, the column in the month with the maximum value will be red.

I also have to do this in markers on the line chart. Making a column first and then turning it into a line sometimes works (conditional formatting)

That seems to differ from the previous requirements. Please clarify.

Your chart is daily. I want to show monthly (as sep 18) and mark the highest value among these months. By the way, I use the order_purchase_timestamp field as the date field.

ex: When the year filter 2018 is selected, let's mark the value in the highest month; when no year is selected, let's mark the highest month in all years.

Those are all different scenarios. You would need to use ISINSCOPE to figure out which scenario you are in and even then you can have mixed situations where the users expand one year but not the others etc.

I don't think it's a complicated situation. I only want this.

sonya7_0-1699193280230.png

 

sonya7_1-1699193382576.png

sonya7_0-1699193512687.png

 

Bar color = 
var a = CALCULATETABLE(SUMMARIZECOLUMNS(DimDate[YearMonth],DimDate[YearMonthNumber]),allselected())
var b = FILTER(ADDCOLUMNS(a,"sm", [Total Revenue]),[sm]>0)
var t = [Total Revenue]
return switch(TRUE(),
t = MINX(b,[sm]),"red",
t = maxx(b,[sm]),"lightgreen",
"lightgrey")

Right now, just finding the max value is enough for me. max value = 1.194.883 ( november 2017)

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.