Forum Discussion
Display total count in Power BI line chart
Hi,
How to display total count value in end of the line chart. In below line chart I have count for 6-3447,12-443,18-1187,24-396.
For Example, 3447+443+1187+396 = 5473
Regards,
Yuvaraj
I think I got it figured out. My results won't match your data set because I had to recreate the sample data. It wouldn't let me copy and paste it from your doc because the size was too large. No worries though, I think I found a solution for you. First create a column as follows (you can add as many groups as you like, I only went to the last 24 months):
6 Month Increments = VAR _DateDiff = DATEDIFF(TODAY(),Sheet1[ModifiedDate],DAY) RETURN SWITCH( TRUE(), _DateDiff > (-180), "1. Last 6 Months", _DateDiff > (-360), "2. Last 12 Months", _DateDiff > (-540), "3. Last 18 Months", _DateDiff > (-720), "4. Last 24 Months", "5. Older" )Then create either use the quick measure creation tool I showed before, or just write one that mirrors the following:
Count of CommunityID running total in 6 Month Increments = CALCULATE( COUNTA('Sheet1'[CommunityID]), FILTER( ALLSELECTED('Sheet1'[6 Month Increments]), ISONORAFTER('Sheet1'[6 Month Increments], MAX('Sheet1'[6 Month Increments]), DESC) ) )This will give you the following result when you put them in your chart:
Here is a PBIX with the solution in it as well in case it helps.
13 Replies
- parry2k
Super User
Anonymous does something liek this will work
- AnonymousNot applicable
Hi parry2k
Thanks for your response.
Am expecting similar to this, could you please provide the steps to acheive this.
Regards,
Yuvaraj
- jtownsend21
Responsive Resident
Anonymous Not sure who you are addressing, but here are the steps to create a quick measure.
Your base value would be your count, and your Field would be whatever field you have on the x-axis.
- jthomson
Solution Sage
Would have thought you could have just added a card visual and stuck in whatever measure you've put in as the values on the line chart?
- jtownsend21
Responsive Resident
I think you should be able to use the running total quick measure.