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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
daxesh
Frequent Visitor

DAX Measure performance

Hello,

Below are some of measures :
1. Count of student = COUNT(Fact[StudentId])
2. Status = IF([Count of student] =1,"One",IF([Count of student]=2,"two","None"))

(Please do not take above formuls's in business logic context , These are just drafted to understand a question.)

 

If you review above formulas, [Status] is using [Count of student] multiple time.
I am wondering : Will Power BI engine calculate [Count of student] once or multiple times as it occurs multiple time in [Status] ?

 

This is related to measure performance optimisation.Above scenario is a imitation of original formula i am using. If inner measure is getting calculated every time it appears in parent formula then there'll be certain performance drop , Right?

 

Do Power BI engine handling such scenario that if inner measure is occuring multiple times in parent measure then calculate it once only OR it will get multiple times?

 

thanks

 

 

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

It's an interesting question, but not sure how meaningful it is. The alternative would be to use COUNT(Fact[StudentId]) in your second formula in place of [Count of student] and at that point, you are certainly calculating it multiple times so...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.

Top Solution Authors