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
Anonymous
Not applicable

Counter that has same value for each day

Hi there!

 

I need a column as shown below:

timeDayCounterindex
11/6/2018 21:00611
11/6/2018 22:00612
11/6/2018 23:00613
11/7/2018 0:00724
11/7/2018 1:00725
11/7/2018 2:00726
11/7/2018 3:00727
12/6/2018 3:00638
12/7/2018 3:00749

 

This counter would assign the same count to each hour of the day. The column should output the same as the sample data as a test.

 

Any thoughts?

 

thanks!

1 ACCEPTED SOLUTION

@Anonymous @AlB

 

i think a RANKX function by date might do the job

 

Column =
RANKX ( Table1, Table1[time].[Date],, ASC, DENSE )

 

 counter.png


Regards
Zubair

Please try my custom visuals

View solution in original post

2 REPLIES 2
AlB
Super User
Super User

Hi @Anonymous

 

So you mean Counter has one value per day, regardless of the time, and that value is unique for each day. Correct?

Where does the 1 start? Or can it be any number as long as they are unique per day?

@Anonymous @AlB

 

i think a RANKX function by date might do the job

 

Column =
RANKX ( Table1, Table1[time].[Date],, ASC, DENSE )

 

 counter.png


Regards
Zubair

Please try my custom visuals

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.