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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
kasife
Helper V
Helper V

Filter by project and date

Hi, guys

 

I have a difficulty, I created the following measure to dilute my goal into days in my calendar table:

 

Meta Diluida = 

VAR MesAno = MONTH(d_calendario[Date])&YEAR(d_calendario[Date])
VAR ProjetoSelecionado = SELECTEDVALUE(projetosReaal[Nome do Projeto Original])

RETURN



IF(
    d_calendario[Dias de trabalho]=1,
        DIVIDE(
            CALCULATE(
                SUM(MetaUH[Meta Desafio]), 
                    FILTER(
                        MetaUH, 
                        MetaUH[Mes ano formula padrão] = MesAno || MetaUH[Mes ano formula padrão] = ProjetoSelecionado
                        )
                ), 
                [Dias uteis Mês])
                )

 

 

And then I added it up and I'm using it in my visuals

 

Total Meta Diluida = 
VAR ProjetoSelecionado = SELECTEDVALUE(MetaUH[Projeto])

RETURN

CALCULATE(
    SUM(d_calendario[Meta Diluida]),
    FILTER(
        projetosReaal, 
        projetosReaal[Nome do Projeto Original] = ProjetoSelecionado
    )
)

 

When I do the filter by selecting date, it works, but when I select the project, the measurement remains static. How could I adjust this?

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @kasife,

I can't access the share link, can you please paste some dummy data here with table format? We can directly copy and enter them into power bi to test coding formula.

How to Get Your Question Answered Quickly  

In addition, you can also try to use the following measure formula if helps:

Total Meta Diluida =
CALCULATE (
    SUM ( d_calendario[Meta Diluida] ),
    FILTER (
        ALLSELECTED ( projetosReaal ),
        projetosReaal[Nome do Projeto Original] IN VALUES ( MetaUH[Projeto] )
    )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @kasife,

I can't access the share link, can you please paste some dummy data here with table format? We can directly copy and enter them into power bi to test coding formula.

How to Get Your Question Answered Quickly  

In addition, you can also try to use the following measure formula if helps:

Total Meta Diluida =
CALCULATE (
    SUM ( d_calendario[Meta Diluida] ),
    FILTER (
        ALLSELECTED ( projetosReaal ),
        projetosReaal[Nome do Projeto Original] IN VALUES ( MetaUH[Projeto] )
    )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msft  it worked. Thansks

amitchandak
Super User
Super User

@kasife , Please share sample data and expected output.
But the approach of following should help

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: https://youtu.be/fvgcx8QLqZU


Matrix as Project plan Visual: https://youtu.be/R25QoiyoSVs


Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@amitchandak Thank you very much for your feedback. Follow the link

https://ufile.io/bxgcjw55 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.