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

Display Values without including in calculation

Hey Dax experts,

 

I have a question for you that I could not find the answer to. 

 

Lets say that I have the following data

ValueGroup
21
31
21
41
52
52
12
12

 

I want to achieve the following:

I want to include in my visualisation all the data, for both group 1 and 2, but I want only to include in my calculations only for value only the data that are in group 2.

So my end result when I would put it in a visual in power bi could look like that:

Gsar_0-1648054925735.png

 

I can use calculate to exclude the data in group 1 but this will also prevent them from showing them in the visual.

 

Please let me know if my query makes sense.

 

Best,

Giorgio

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Gsar ;

Has Tamerj1 solved your problem? His method is correct, of course you also use the ISINSCOPE function, as follows:

Measure = IF(ISINSCOPE('Table'[Group]),MAX([Value]),CALCULATE(SUM([Value]),'Table'[Group]=2))

The final output is shown below:

vyalanwumsft_0-1648437362840.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @Gsar ;

Has Tamerj1 solved your problem? His method is correct, of course you also use the ISINSCOPE function, as follows:

Measure = IF(ISINSCOPE('Table'[Group]),MAX([Value]),CALCULATE(SUM([Value]),'Table'[Group]=2))

The final output is shown below:

vyalanwumsft_0-1648437362840.png


Best Regards,
Community Support Team _ Yalan Wu
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 @Gsar 

try

IF ( HASEONEVALUE ( Table[Group] ), SUM ( Table[Value] ), CALCULATE ( SUM ( Table[Value] ), Table[Group] = 2 ))

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.