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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

how to show active dealer or inactive dealer based on sales

Hi,

 

Request your guidance to solve this issue of mine

 

My table contains sales data for last three months, based on this data we have created a dashboard with multiple visuals. Now my boss wants the matrix visual to have a column which will show whether the dealer is active or inactive based on sales, i.e. if there is no sales for last 60 days then it should show as inactive else active.  request your help to overcome this hurdle

 

regards,

santhosh unnikrishnan

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , First create a measure like

Rolling 60 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-60,DAY))

 

then try meausre like

Inactive = countx(values(Table[Dealer]), if (Isblank([Rolling 60), [Dealer], blank()) )

 

Active = countx(values(Table[Dealer]), if (not(Isblank([Rolling 60)), [Dealer], blank()) )

 

Works best with separate date table joined to you table and a Separate Dealer table

 

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529


To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

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

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , First create a measure like

Rolling 60 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-60,DAY))

 

then try meausre like

Inactive = countx(values(Table[Dealer]), if (Isblank([Rolling 60), [Dealer], blank()) )

 

Active = countx(values(Table[Dealer]), if (not(Isblank([Rolling 60)), [Dealer], blank()) )

 

Works best with separate date table joined to you table and a Separate Dealer table

 

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529


To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

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
Anonymous
Not applicable

hi amitchandak,

 

thank you very much for your help, this one is cool

 

thanks again

 

regards,

dsmitha

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.