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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Need help with Dax Measure

Hi, 
I have facing performance issue with a measure in my power bi report where I have creating the below measure

Transaction Count  =
COUNTROWS (
FILTER (
SUMMARIZE (
'Compiled Sales',
'Compiled Sales'[Store Code],
'Compiled Sales'[BillNo],
"Total", SUM ( 'Compiled Sales'[Sold Quantity] )
),
[Total] > 0
)
)

can this measure be created in another way currently this dax is taking 20 sec and my main fact table has 20 million records.
please let me know if any other information is requried.

 




1 REPLY 1
tamerj1
Super User
Super User

Hi @Anonymous 
Usually it should not be slow but in some occasions when creating a column inside SUMMARIZE. The thing is this is a simple sum calculation which leaves in doubts. However, you may try the following to avoid creating the column inside SUMMARIZE.

Transaction Count =
SUMX (
    SUMMARIZE (
        'Compiled Sales',
        'Compiled Sales'[Store Code],
        'Compiled Sales'[BillNo]
    ),
    INT ( CALCULATE ( SUM ( 'Compiled Sales'[Sold Quantity] ) ) > 0 )
)

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.