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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Dain
Frequent Visitor

Percentage in line chart

Hi all

I have a table with source ,jobs , processing time , status as columns.I want to plot a line chart tat shows trends of success n failure over time(year months day hour).
Source. Job time. Success
S1. J1. 20180502. Success
S1. J2. 20180503. Success
S2. J3. 20180505 Failed
S3. J4. 20180505. Failed
S3. J5. 20180506. Success
S3. J6. 20180506 Failed

I want to plot the trends of success and failure in a line chart with percent age as the axis .this visuals drill down hierarchy is below
Year
Month
Day
Hour
Source
Job
UI

I have two queries

How can I add hour to a date hierarchy.
How can we get the percentage. Calculated for each drill down category like year day source job name.


Thanks
1 REPLY 1
v-juanli-msft
Community Support
Community Support

1.How can I add hour to a date hierarchy?
You should create custom columns for Year, Month, Day, Hour and then drag and drop them into a hierarchy.
From your data example, it seems the column “time” is a text or number field. To have a date hierarchy, first you can covert it to a date type column.
I test with the following formula which can convert a column from text to date type.
date = DATE(LEFT([time],4),MID([time],5,2),RIGHT([time],2))
hour = HOUR([date])
1.png
As the original field doesn’t contain any time, so the output above shows the same time.
Then add these two calculated columns to Axis field.
2.png
 
2.How can we get the percentage. Calculated for each drill down category like year day source job name?
To better answer this question, please let me know what’s the rule for calculating the percentage column.
This is to say which columns you would like to use and what’s meaning this calculated column will indicate.
 
Additionally, I am confused by what you said.
“I want to plot the trends of success and failure in a line chart with percent age as the axis”
“How can we get the percentage. Calculated for each drill down category like year day source job name”
These two statements seem to be conflict.
As I can make out, we need add percentage column to Values Field and add category like year day source job name columns to Axis Field in the line chart, so that the percentage can be drilling down by those categories.
 
Best Regards
Maggie

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.