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
eliasayy
Impactful Individual
Impactful Individual

Create A Graph Between Time And Distinct Value

Hello so i have a table containing date time and Status Status is :DNC(Do not call) , Sale(Sale made)... So i want to create a graph where i only need the count of DNC on a graph over time not the date but time as in 7:09, 13:39,20:08....

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi @eliasayy ,

 

You may try this solution.

Here are the sample data.

vcazhengmsft_0-1658801315699.png

 

1 Create a Calculated column

Time = FORMAT('Table'[DateTime],"hh:mm")

 

2 Create a measure to count DNC

Count DNC = CALCULATE(COUNT('Table'[ Status]),FILTER('Table','Table'[ Status]="DNC(Do not call)"))

 

The result looks like this.

vcazhengmsft_1-1658801315701.png

 

Also, attached the pbix file as reference.

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

View solution in original post

6 REPLIES 6
eliasayy
Impactful Individual
Impactful Individual

Hello so i have a table containing date time and Status Status is :DNC(Do not call) , Sale(Sale made)... So i want to create a graph where i only need the count of DNC on a graph over time not the date but time as in 7:09, 13:39,20:08....

@eliasayy You can get just the time value in a column like this:

Time = TIME(HOUR([DateTime]), MINUTE([DateTime], SECOND([DateTime]))


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler what about the distinct status? i want the count of how many DNC only 

@eliasayy You can use DISTINCTCOUNT or COUNTROWS(DISTINCT('Table[Column]))


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
v-cazheng-msft
Community Support
Community Support

Hi @eliasayy ,

 

You may try this solution.

Here are the sample data.

vcazhengmsft_0-1658801315699.png

 

1 Create a Calculated column

Time = FORMAT('Table'[DateTime],"hh:mm")

 

2 Create a measure to count DNC

Count DNC = CALCULATE(COUNT('Table'[ Status]),FILTER('Table','Table'[ Status]="DNC(Do not call)"))

 

The result looks like this.

vcazhengmsft_1-1658801315701.png

 

Also, attached the pbix file as reference.

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

amitchandak
Super User
Super User

@eliasayy , Create two separate column in table

 

Date = Datevalue([Datetime])

 

Time = timevalue([datetime])

 

And create a measure and use it with time

 

measure = countrows(filter(Table,Table[DND] = "Y"))

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.

Top Solution Authors