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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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!:
The Definitive Guide to Power Query (M)

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!:
The Definitive Guide to Power Query (M)

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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