Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello,
I have this table structure
Item | Item Type | Production Date |
1 | Produce | 8/10/2021 |
2 | Fruit | 8/12/2021 |
3 | Produce | 8/13/2021 |
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?
Hi @SamOvermars
Download new sample PBIX file.
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.
You said:
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?
Regards
Phil
Proud to be a Super User!
Hi @SamOvermars
Can you upload that file somewhere else please? That site is full of malware and ads and my security software is blocking it.
Regards
Phil
Proud to be a Super User!
Sorry about that @PhilipTreacy . Heres a drop box link
https://www.dropbox.com/s/roi3k2dv94q4sum/SamOvermars.pbix?dl=0
Hi @SamOvermars
Download this PBIX file with the following code
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
Regards
Phil
Proud to be a Super User!
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.
Hi @SamOvermars
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?
Regards
Phil
Proud to be a Super User!
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"
User | Count |
---|---|
119 | |
66 | |
65 | |
56 | |
50 |
User | Count |
---|---|
177 | |
84 | |
70 | |
64 | |
54 |