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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
sns1996
Helper I
Helper I

Gráfico coluna últimos 4 meses

Recebo diariamente reclamções onde da entrega de revista, o cliente pode realizar reclamações de qualquer mês para traz, exemplo: hoje ele pode realizar reclamações do mês de janeiro.

Preciso criar um gráfico com as reclamações no decorrer dos meses, sendo que somente as reclamações dos últimos quatro meses seja considerada, reclamações cadastrada depois deste período não devem ser consideradas no gráfico.

1 ACCEPTED SOLUTION
dharmendars007
Memorable Member
Memorable Member

Hello @sns1996 , 

 

You can create measure that calculates the complaints for only last 4 months like below dummy measure..

 

Complaints Last 4 Months =
CALCULATE(COUNTROWS(ComplaintsTable),
DATESINPERIOD(ComplaintsTable[ComplaintDate],MAX(ComplaintsTable[ComplaintDate]),-4,MONTH))

 

If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

View solution in original post

2 REPLIES 2
v-mengmli-msft
Community Support
Community Support

Hi @sns1996 ,

 

Thanks for @dharmendars007 reply!

 

@sns1996 Here is a simple method for your reference. Add a relative date slicer to filter rows created in last 4 months.

The relevant document is for your reference.Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn

vmengmlimsft_0-1727246670691.png

vmengmlimsft_1-1727246702380.png

 

 

Best regards,

Mengmeng Li

dharmendars007
Memorable Member
Memorable Member

Hello @sns1996 , 

 

You can create measure that calculates the complaints for only last 4 months like below dummy measure..

 

Complaints Last 4 Months =
CALCULATE(COUNTROWS(ComplaintsTable),
DATESINPERIOD(ComplaintsTable[ComplaintDate],MAX(ComplaintsTable[ComplaintDate]),-4,MONTH))

 

If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

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.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.