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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

How to show active and inactive dealers based on last transaction

Hi,

 

Request your guidance to solve this issue

 

In my dashboard  I would like to show the dealers as "Active " and " Inactive" based on their last transaction date.  Say if any dealer  who has not done any transaction for last 30 days ( i.e. considering today as 20/09/2022, from 21/08/2022 till today ) then that dealer should be marked as "Inactive" in my "Table" visual and those who have transactions for the last 30 days then they should be displayed as "Active". 

 

Also, i need the count of "Active" and "Inactive" dealers  to be shown in Column chart visual

 

Kindly advise 

 

screenshot of my data

( sender = dealer) 

dsmitha_0-1663649845337.png

 

regards,

dsmitha

 

1 ACCEPTED SOLUTION
PijushRoy
Super User
Super User

Hi @Anonymous 
Sorry my bad, I mistakely clicked on Solution button in place of reply button.

By the way, please try this
01.JPG

 

 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





View solution in original post

6 REPLIES 6
PijushRoy
Super User
Super User

Hi @Anonymous 
Sorry my bad, I mistakely clicked on Solution button in place of reply button.

By the way, please try this
01.JPG

 

 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Anonymous
Not applicable

hi PijushRoy,

 

thanks a lot, it worked exactly as i wanted

 

double kudoz

 

regards,

dsmitha

 

Anonymous
Not applicable

hi PijushRoy,

 

no worries, in fact i was wondering did i click "accept a solution"  

 

i will check and get back to you soon 

thanks in advance

 

regards,

dsmitha

PijushRoy
Super User
Super User

Hi @Anonymous 

Please try to use this calculation, please change as per your column name

 

VAR today_ = TODAY()
RETURN
SWITCH(
TRUE(),
DATEDIFF(TransactionDate,today_,Day)>=30,"Inactive",
"Active")

 

 

Let me know, it works or not

If solve your requirement, please mark this answer as SOLUTION
If this comment helps you, please LIKE 👍 this comment/Kudos 

 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





VahidDM
Super User
Super User

Hi @Anonymous 

 

Can you post sample data (more data with 2 or 3 dealers) as text and expected output?

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Relation between your tables

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

 

Anonymous
Not applicable

Hi VahidDM,

 

Furnished herewith details requested;

 

 

01) Sample Data

Created_Date Time sender
6/2/2022 12:09:19 AM tigdealer_2004
6/2/2022 7:31:51 AM tig-1070226
6/2/2022 8:15:29 AM TIG_1044356
7/1/2022 12:04:17 AM tig_khazimi
7/1/2022 12:47:19 AM tigdealer_237
7/1/2022 7:31:31 AM TIG_5123798
7/1/2022 8:12:08 AM tig_1131687

 

02) Eg:   tig-1070226 was having sales in June 2022 but in July 2022 there was no sales,  for dealers who are not having sales for 30 days or more should be marked as "inactive" and for othes it should be marked as "active" dealers 

 

03) for this dashboard am using single table

 

regards,

dsmitha 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.