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

Help with Report

I have a report in which one tab shows new accounts and accounts that dropped out of the data.  They are shown in two separate tables.  There is a slicer on the page for Quarter.

Example:

AccountQuarterExposure
ABC21Q1100
ABC21Q2500
EFG21Q1200
XYZ21Q2800

In this example ABC and EFG would be new in 21Q1, XYZ would be new in 21Q2, and EFG would be "dropped out" in 21Q2.  The problem I have is that if I select 21Q2 I want to see XYZ in the new accounts table, and EFG in the dropped out accounts table.  However, since the quarter for EFG is 21Q1, it does not appear.

 

If anyone has any suggestions, I would greatly appreciate it.  Thanks!

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

Hi, @Anonymous 

 

Please try the following steps:

1. Create a calculation table

Quarter = SUMMARIZE('Table',[Quarter])

And to create a slicer with the summarized quarter field.

 

2. Create a calculated column

YQ_index = YEAR('Table'[Date])*10+QUARTER('Table'[Date])

3. Create a measure

NEW/OLD/OUT = 

VAR _CURRENT_T=FILTER(ALL('Table'),'Table'[Quarter]=SELECTEDVALUE('Quarter'[Quarter]))
VAR _CURRENT_YQ=MAXX(_CURRENT_T,[YQ_index])

VAR _CURRENT_Q_List=SUMMARIZE(_CURRENT_T,[Account])

VAR _PRE_YQ=MAXX(FILTER(ALL('Table'),'Table'[YQ_index]<_CURRENT_YQ),[YQ_index])
VAR _PRE_Q_List=SUMMARIZE(FILTER(ALL('Table'),'Table'[YQ_index]=_PRE_YQ),[Account])

VAR _CURRENT_Account=MAX('Table'[Account])
VAR _IF=
        SWITCH(
            TRUE(),
            _CURRENT_Account IN _CURRENT_Q_List && _CURRENT_Account IN _PRE_Q_List,"OLD",
            _CURRENT_Account IN _CURRENT_Q_List && NOT(_CURRENT_Account IN _PRE_Q_List),"NEW",
            NOT(_CURRENT_Account IN _CURRENT_Q_List) && _CURRENT_Account IN _PRE_Q_List,"OUT")
return _IF

 

Result:

vangzhengmsft_0-1636957052520.png

vangzhengmsft_1-1636957262882.png

 

Please refer to the attachment below for details. Hope this helps.

 

 

 

Best Regards,
Community Support Team _ Zeon Zheng


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

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

Please try the following steps:

1. Create a calculation table

Quarter = SUMMARIZE('Table',[Quarter])

And to create a slicer with the summarized quarter field.

 

2. Create a calculated column

YQ_index = YEAR('Table'[Date])*10+QUARTER('Table'[Date])

3. Create a measure

NEW/OLD/OUT = 

VAR _CURRENT_T=FILTER(ALL('Table'),'Table'[Quarter]=SELECTEDVALUE('Quarter'[Quarter]))
VAR _CURRENT_YQ=MAXX(_CURRENT_T,[YQ_index])

VAR _CURRENT_Q_List=SUMMARIZE(_CURRENT_T,[Account])

VAR _PRE_YQ=MAXX(FILTER(ALL('Table'),'Table'[YQ_index]<_CURRENT_YQ),[YQ_index])
VAR _PRE_Q_List=SUMMARIZE(FILTER(ALL('Table'),'Table'[YQ_index]=_PRE_YQ),[Account])

VAR _CURRENT_Account=MAX('Table'[Account])
VAR _IF=
        SWITCH(
            TRUE(),
            _CURRENT_Account IN _CURRENT_Q_List && _CURRENT_Account IN _PRE_Q_List,"OLD",
            _CURRENT_Account IN _CURRENT_Q_List && NOT(_CURRENT_Account IN _PRE_Q_List),"NEW",
            NOT(_CURRENT_Account IN _CURRENT_Q_List) && _CURRENT_Account IN _PRE_Q_List,"OUT")
return _IF

 

Result:

vangzhengmsft_0-1636957052520.png

vangzhengmsft_1-1636957262882.png

 

Please refer to the attachment below for details. Hope this helps.

 

 

 

Best Regards,
Community Support Team _ Zeon Zheng


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Anonymous , I am assuming you mean new visual table.

 

Seem very similar to the approach of a new customers, a lost customers. You need to have period as qtr

 

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

 

Customer Retention Part 5: LTD Vs Period Retention
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-5-LTD-and-PeriodYoY-Retention-is-only/ba-p/2114497

 

 

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

I'm not sure what you mean by needing to have period as quarter.  I am already using quarter, but it doesn't work.

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.