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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
jdelacrettaz
Frequent Visitor

filter between the first day of the month to the current date power bi

Good afternoon, I have a table where in a column frame with a 1 the working days and with 0 on Sundays. My question is the following, I want to show in a card the number of days that go of the month in process but without using the filter date, I want that it is not modified and it goes increasing while the days pass. Always taking the first of the month today. Is there any formula to use?

 

iam using this formulas but give me all days that have the month 

Cantidad de dias = SUMX (
FILTER (
fecha_act,
DATE ( YEAR ( fecha_act[fecha] ), MONTH ( fecha_act[fecha]), 1 )
= DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 )
),
fecha_act[Dias Utiles]
)
 I use this formula but it gives me back the amount of useful days that I will have in the month and I want it to go away for the day that I am
1 ACCEPTED SOLUTION
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @jdelacrettaz 

Please check below measure.Attached sample file for your reference.

Measure = 
CALCULATE (
    COUNT ( fecha_act[Useful Days] ),
    FILTER (
        fecha_act,
        fecha_act[Useful Days] = 1
            && YEAR ( fecha_act[Date] ) = YEAR ( TODAY () )
            && MONTH ( fecha_act[Date] ) = MONTH ( TODAY () )
            && fecha_act[Date] <= TODAY ()
    )
)

Regards,

Community Support Team _ Cherie Chen
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

1 REPLY 1
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @jdelacrettaz 

Please check below measure.Attached sample file for your reference.

Measure = 
CALCULATE (
    COUNT ( fecha_act[Useful Days] ),
    FILTER (
        fecha_act,
        fecha_act[Useful Days] = 1
            && YEAR ( fecha_act[Date] ) = YEAR ( TODAY () )
            && MONTH ( fecha_act[Date] ) = MONTH ( TODAY () )
            && fecha_act[Date] <= TODAY ()
    )
)

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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