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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Krijgersss
Helper II
Helper II

help with a date colum

Hello i need some help with a date Colum. i have a date colum that gives a date of a shop if its open. so if there is a date the shop will be open. how do i count the days in that colum that i know how many days each month the shop is open.

many thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Krijgersss ,

 

You can create calculated columns and write dax expressions:

Column =
CALCULATE(COUNT('Table'[date]),
FILTER(ALL('Table'),
EARLIER('Table'[date]) >= EOMONTH('Table'[date],-1)+1 && EARLIER('Table'[date]) <= EOMONTH('Table'[date],0) && ' Table'[date] <= EARLIER('Table'[date])))


The result obtained is shown below:

vkaiyuemsft_0-1709190814166.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Krijgersss ,

 

You can create calculated columns and write dax expressions:

Column =
CALCULATE(COUNT('Table'[date]),
FILTER(ALL('Table'),
EARLIER('Table'[date]) >= EOMONTH('Table'[date],-1)+1 && EARLIER('Table'[date]) <= EOMONTH('Table'[date],0) && ' Table'[date] <= EARLIER('Table'[date])))


The result obtained is shown below:

vkaiyuemsft_0-1709190814166.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

timalbers
Super User
Super User

Hi @Krijgersss  try something like this within a new measure:

new_measure = DISTINCTCOUNTNOBLANK( your_table[Date_column] )

 


—————————————————————————————
✔️ If my answer helped you, please consider marking it as a solution.

Thats not excatly what i want now it gives me only 1 by every date i want it to count so for example:

1-1-2024   1

2-1-2024   2

4-1-2024   3

5-1-2024   4
6-2-2024   1

7-2-2024   2

so in January the shop was 4 days open and in february the shop was 2days open

 

I wonder, how you would like to display this data.
If you want to display it in a table visual, then just add another calculated column to your data that gives you the month and then you could use this field in your table visual combined with the measure I posted. Then you will have the exact number of days found for every month.


—————————————————————————————
✔️ If my answer helped you, please consider marking it as a solution.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.