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
vanessafvg
Community Champion
3 years agoyep you could just drag the measure like i have here