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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
hhaimer
Frequent Visitor

Calculate differently the values and the total of a column using DAX

Hello everyone !

It is possible to create a measure on DAX that calculates the rows of a column with one formula and the total of the same column with another formula

Thank you in advance

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @hhaimer 

yes possible using IF ( ISINSCOPE ( 'Table'[Slicing by column] ), [normal formula], [Toatal formula] )

View solution in original post

4 REPLIES 4
v-yueyunzh-msft
Community Support
Community Support

Hi, @hhaimer 

According to your description, you want to calculate different values according to different conditions, you can use the switch(true()) function to achieve your logical judgment needs, if you want to count the number of rows, you can use the count() function to get the number of rows of the corresponding column.

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

 

tamerj1
Super User
Super User

Hi @hhaimer 

yes possible using IF ( ISINSCOPE ( 'Table'[Slicing by column] ), [normal formula], [Toatal formula] )

Thank you @tamerj1 !!

@hhaimer 
Most welcome. 

Would you please vote for Microsoft Idea (powerbi.com)?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.