Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ms5991
Microsoft Employee
Microsoft Employee

Line Chart Count/Sum/Stdv/etc Of...

I have two columns in a table, one called JobId, which is unique, and one called StartTime, which is a Date/Time cooresponding to when that job began and is not necessarily unique.  I would like to have a line graph where the x axis is the time, and the y axis is the value of each JobId, so I can see how JobId's are assigned over time.  The problem is that when I put StartTime in the axis box and JobId in the Values box, it only lets me do some sort of calculation on JobId, such as SUM, CountOf, etc.  I want the actual value, but that isn't an option.

 

I saw another post with this problem, and the given solution was to make sure the data column was of type WholeNumber, but JobId is of that type.  How can I do this? 

2 REPLIES 2
v-sihou-msft
Microsoft Employee
Microsoft Employee

@ms5991

 

In this secnario, you can use CALENDAR() function to generate a full calendar date table first. Create another table using GROUPBY() to group by your source table on StartTime column, aggregated with countrows of JobIds. The expression can be like:

 

Table2= GROUPBY('table','table'[StartTime],"Count Of JobIds",CountRows(currentgroup())) 

Then you can LOOKUPVALUE() the [Count Of JobIds] column into calendar table based on date/time column.

 

 

=LOOKUPVALUE('Table2'[Count Of JobIds], 'Table2'[StartTime], 'CalendarTable'[DateTime])

Now you can create a line chart based on this Calendar table. Populate date time on X-Axis, and "Count Of JobIds" in Values.

 

 

Regards,

Greg_Deckler
Community Champion
Community Champion

You might need to explore a custom visualization for this.

 

https://app.powerbi.com/visuals/

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.