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
mohit19
Frequent Visitor

DAX Result

I have attach a screenshot of my table view :http://prntscr.com/jx6ow8

I have created a measure :
Measure 6 = CALCULATE(COUNT(TblStudent[StId]),TblStudent[StStatus]="Active"), which give count of active student,

I have created  another measure:

StudentCount=IF(CALCULATE(COUNT(TblStudent[StId]),TblStudent[StStatus]="Active")>20,20,CALCULATE(COUNT(TblStudent[StId]),TblStudent[StStatus]="Active"))

It return 20 if count of student is greater than 20 in table view else same value, But the total at bottom in table show 20 for StudentCount, please guide how can I correct it?

 

Thanks in advance... 

 

3 REPLIES 3
Anonymous
Not applicable

HI @mohit19,

 

You can try this, I add condition to skip replace formula calculate on total level:

StudentCount =
IF (
    CALCULATE ( COUNT ( TblStudent[StId] ), TblStudent[StStatus] = "Active" )
        > 20
        && ISFILTERED ( TblStudent[StId] ),
    20,
    CALCULATE ( COUNT ( TblStudent[StId] ), TblStudent[StStatus] = "Active" )
)

Regards,

Xiaoxin Sheng

jthomson
Solution Sage
Solution Sage

It does not solve my problem, can you please provide dax expression for that.

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.