Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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
Solved! Go to 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")
I could swear this was possible before but somehow the marker colors are no longer dynamic. No idea what is happening here.
It works with columns
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.
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)