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
Flavia_helena
Regular Visitor

Medida de vendas vencidas e inadimplência

Olá comunidade!

Preciso realizar essas duas medidas para um projeto:

 

1) Valor vendas vencidas (vendas total – desconto)

[quando data de vencimento <= dia de análise]

2) Valor inadimplência total (vendas total – desconto)

[quando data de vencimento <= dia de análise e [quando não houver data de pagamento]

 

Como consigo resolvê-las em DAX?

 

Segue em anexo o arquivo pbix.

 

Obrigada!

https://drive.google.com/file/d/1WUPgL834dXHxZD5Ri0au7ybPuYuI43eo/view?usp=sharing 

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

Hi, @Flavia_helena ;

Try it.

VALOR VENDAS VENCIDAS = 
CALCULATE (
    [VALOR TOTAL VENDAS] - [VALOR TOTAL DE DESCONTO],
    FILTER ( fVENDAS, fVENDAS[Data Vencimento] <= MAX(dCALENDARIO[Date] ) )
)
Valor inadimplência total = CALCULATE([VALOR VENDAS VENCIDAS],FILTER('fVENDAS',[Data Pagamento]=BLANK()))

The final show:

vyalanwumsft_0-1655173072986.png


Best Regards,
Community Support Team _ Yalan Wu
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-yalanwu-msft
Community Support
Community Support

Hi, @Flavia_helena ;

Try it.

VALOR VENDAS VENCIDAS = 
CALCULATE (
    [VALOR TOTAL VENDAS] - [VALOR TOTAL DE DESCONTO],
    FILTER ( fVENDAS, fVENDAS[Data Vencimento] <= MAX(dCALENDARIO[Date] ) )
)
Valor inadimplência total = CALCULATE([VALOR VENDAS VENCIDAS],FILTER('fVENDAS',[Data Pagamento]=BLANK()))

The final show:

vyalanwumsft_0-1655173072986.png


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

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.