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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
dreycruz
New Member

DAX for transacting accounts

Hi! Need some help with dax to compute the number of transacting accounts where they have sales for the month, quarter, and year.

I have Sales table with the following columns: account name, sales, month, date, year

I already have this query. But if i make it into startofquarter, nothing changes with the result.

CALCULATE(
    DISTINCTCOUNT('Raw data'[UniqueAcctName]),
    FILTER(
        'Raw data',
        [MTD Sales] <> 0
    ),
    FILTER(
        ALL('Calendar'),
        'Calendar'[Date] >= STARTOFMONTH('Calendar'[Date]) &&
        'Calendar'[Date] <= ENDOFMONTH('Calendar'[Date])
    ),
    'Calendar'[Year] = "2025"
)
1 ACCEPTED SOLUTION
v-tejrama
Community Support
Community Support

Hi @dreycruz ,

 

I successfully outlined the process for calculating Monthly, Quarterly, and Yearly Transacting Accounts in Power BI, where a transacting account is any account with non-zero sales in a specific period. Starting with a Raw data table containing UniqueAcctName, Sales, and Date, I created a Calendar table using CALENDAR(), then added Month, Quarter, and Year columns. After establishing a relationship between Raw data[Date] and Calendar[Date], I developed three DAX measures with CALCULATE and DISTINCTCOUNT, using FILTER along with MONTH, YEAR, and FORMAT to accurately reflect each time frame. By organizing Calendar[Quarter] above Calendar[Month] in the Rows of a matrix visual, I ensured months were grouped under their respective quarters.

 

The resulting output displays each month’s transacting account count nested under each quarter, with yearly totals calculated accurately. This approach enabled me to clearly and confidently visualize sales activity trends over time.

 

I’ve attached the .pbix file and screen short used in this test for your reference.

vtejrama_0-1753352199509.png

 

 

Thank you,

Tejaswi.

View solution in original post

5 REPLIES 5
v-tejrama
Community Support
Community Support

Hi @dreycruz ,

 

I successfully outlined the process for calculating Monthly, Quarterly, and Yearly Transacting Accounts in Power BI, where a transacting account is any account with non-zero sales in a specific period. Starting with a Raw data table containing UniqueAcctName, Sales, and Date, I created a Calendar table using CALENDAR(), then added Month, Quarter, and Year columns. After establishing a relationship between Raw data[Date] and Calendar[Date], I developed three DAX measures with CALCULATE and DISTINCTCOUNT, using FILTER along with MONTH, YEAR, and FORMAT to accurately reflect each time frame. By organizing Calendar[Quarter] above Calendar[Month] in the Rows of a matrix visual, I ensured months were grouped under their respective quarters.

 

The resulting output displays each month’s transacting account count nested under each quarter, with yearly totals calculated accurately. This approach enabled me to clearly and confidently visualize sales activity trends over time.

 

I’ve attached the .pbix file and screen short used in this test for your reference.

vtejrama_0-1753352199509.png

 

 

Thank you,

Tejaswi.

Hi @dreycruz ,

 

I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.

Thank you.

 

Hi @dreycruz ,

 

I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.

Thank you.

 

Hi @dreycruz ,

 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

Thank you.

Cookistador
Super User
Super User

Hi @dreycruz 

 

Your issue is not very clear, can you provide a small example of what you are trying to achieve ?

Maybe by sharing a dummy data sample, and showing what the final result should look like

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.

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.