I have this table structure
|Item||Item Type||Production Date|
I added a line chart, added the count of items to the value field(I believe it should be the sum of items within an item type)
and the production date to the axis, but I'm getting the line going up and down which is not what I'm desiring.
it is counting how many items per day, while I want how many items were produced to date. In my example, 8/13 should show 2 "produce" items were produced while only 1 item in 8/10
eventually, I need to have a line chart that will show how many total items were produced over time. something like this
How can I achieve this?
I'm not clear what the problem is.
In your supplied file it looks like you've tried to add a filter for the Item Type? If you just want to show certain Items you can add a Slicer and filter those as you wish - see linked file above.
I need to have a filter on the chart that will be based on another value from the table - what other value?
The line is not letting me filter it and will keep calculating just the totals - what do you want it to do?
Use a measure like this
CountMeasure = CALCULATE(COUNTROWS('DataTable'), FILTER(ALL('DataTable'), [Item Type] = SELECTEDVALUE('DataTable'[Item Type]) && [Production Date] <= SELECTEDVALUE('DataTable'[Production Date])) )
Then plot that on the Line Chart with the Item Type in the Legend
Thank you for the solution it worked to get the totals but I need to have a filter on the chart that will be based on another value from the table. The line is not letting me filter it and will keep calculating just the totals.
For example if I add another column to the filters pane it will not change anything. I re attached the pbix to show what I mean. Thanks again.
Sounds like you want to create a running total for each Item Type? And you will have multiple lines, one for each Item or do you want an overall total for all item types meaning the chart will just have 1 line?
Correct will need to have running total for each item type. in my example the chart will have two lines
one for "Produce" and one for "Fruit"
Learn how to create your own user groups today!
Click here to read more about the November 2021 Updates!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.