Forum Discussion
Anonymous
4 years agoNot applicable
Bar chart visualization for different years
Hello! I believe there should be a rather easy solution for this, but for some reason, I haven't been able to do this I have a list of products with the launching year and the year they will be...
- 4 years ago
You'll need a new table to use for the x-axis.
For example:
Years = SELECTCOLUMNS ( GENERATESERIES ( MIN ( Products[Launched] ), MAX ( Products[Discontinued] ) ), "Year", [Value] )This is just a list of years between 2008 and 2040.
Put Years[Year] on the x-axis and define your counting measures.
LaunchedCount = CALCULATE ( COUNTROWS ( Products ), Products[Launched] IN VALUES ( Years[Year] ) ) DiscontinuedCount = CALCULATE ( COUNTROWS ( Products ), Products[Discontinued] IN VALUES ( Years[Year] ) )
AlexisOlson
Super User
4 years agoYou'll need a new table to use for the x-axis.
For example:
Years =
SELECTCOLUMNS (
GENERATESERIES ( MIN ( Products[Launched] ), MAX ( Products[Discontinued] ) ),
"Year", [Value]
)
This is just a list of years between 2008 and 2040.
Put Years[Year] on the x-axis and define your counting measures.
LaunchedCount =
CALCULATE (
COUNTROWS ( Products ),
Products[Launched] IN VALUES ( Years[Year] )
)
DiscontinuedCount =
CALCULATE (
COUNTROWS ( Products ),
Products[Discontinued] IN VALUES ( Years[Year] )
)
Anonymous
4 years agoNot applicable