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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Clientes inativos

Olá, eu tenho uma tabela de movimento dos clientes que tem as seguintes colunas:

id_cliente

[count_mov_cliente] --- (dax formula)

id_calendario

 

E tenho uma tabela para o calendario e outra para os clientes.

 

Quero calcular os clientes sem movimentos em 6 ou mais meses.

 

A tabela de calendario tem datas até 2030.

 

Por favor ajuda.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , first have 6 month rolling measure

 

Rolling 6= CALCULATE([count_mov_cliente],DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-6,MONTH))

 

then create a measure like

 

countx(values(Table[id_cliente]) , if (isblank([Rolling 6]) , [id_cliente], blank()) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

fiz a seguinte adaptação : 

Rolling 6 = CALCULATE([Count_mov_cliente],DATESBETWEEN('d calendar'[DATA], TODAY()-30, TODAY()))
 
 
 
Anonymous
Not applicable

Hi @Anonymous,

Did the above suggestions help with your scenario? If that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements.

If they also don't help, please share some dummy data that keep raw data structure with expected results to help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Obrigada por responder, mas  a minha tabela de calendario vai até 2030, o MAX('Date'[Date ])  irá trazer o 2030 não? 

 

fiz a seguinte adaptação mas não sei se está correcto: 

Rolling 6 = CALCULATE([Count_mov_cliente],DATESBETWEEN('d calendar'[DATA], TODAY()-30, TODAY()))      

 

 

e no segundo dax, a minha tabela de moviemntos é uma factual, posso usar o distict count?

amitchandak
Super User
Super User

@Anonymous , first have 6 month rolling measure

 

Rolling 6= CALCULATE([count_mov_cliente],DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-6,MONTH))

 

then create a measure like

 

countx(values(Table[id_cliente]) , if (isblank([Rolling 6]) , [id_cliente], blank()) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
amitchandak
Super User
Super User

@Anonymous , first have 6 month rolling measure

 

Rolling 6= CALCULATE([count_mov_cliente],DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-6,MONTH))

 

then create a measure like

 

countx(values(Table[id_cliente]) , if (isblank([Rolling 6]) , [id_cliente], blank()) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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