Forum Discussion
PowerConsumer21
3 years agoFrequent Visitor
Creating measure for stacked bar chart
Hello, I'm having trouble creating a measure, example table below. Third column is irrelevent but might help understanding so I included it. I'm creating a stacked bar chart to display companies and ...
- 3 years ago
you could do something like this
create a flag for the first years
IsNewYear =var com = SELECTEDVALUE('New Company'[Company])var yr= CALCULATE(MIN('New Company'[Date]), all('New Company'), 'New Company'[Company] = com)var dte = SELECTEDVALUE('New Company'[Date])return if(dte = yr, 1,0)and then do some conditional formatting on the chart when the value is =1
vanessafvg
Community Champion
3 years agoyou could do something like this
create a flag for the first years
IsNewYear =
var com = SELECTEDVALUE('New Company'[Company])
var yr= CALCULATE(MIN('New Company'[Date]), all('New Company'), 'New Company'[Company] = com)
var dte = SELECTEDVALUE('New Company'[Date])
return if(dte = yr, 1,0)
and then do some conditional formatting on the chart when the value is =1
PowerConsumer21
3 years agoFrequent Visitor
Thank you for the reply! Would there be any way to display it on the same column? If multiple companies are in the same year, just the ones that published for the first time needs to be a different color.