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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Employee
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
Employee
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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors